我需要一个strikethrough function for if else function use。
如果有两个人或以上,excel就要跑出来 割掉“I” (We/I),
如果一个人 ,excel cell l就跑出来割掉“We”( We/I)。
我试了以下vba,但是跑出来“1,0,#value”求神人,保佑大大一生平安。
> Option Explicit
> Function CountStrikeThrough(myRng As Range) As Long
>
> Application.Volatile
>
> Dim myCell As Range
> Dim ctr As Long
>
> ctr = 0
> For Each myCell In myRng.Cells
> If myCell.Font.Strikethrough = True Then
> ctr = ctr + 1
> End If
> Next myCell
>
> CountStrikeThrough = ctr
>
> End Function