
Originally Posted by
CanMan12
Function GetCnt(st As String)
Application.Volatile
Dim cnt As Long
cnt = 0
For i = 2 To Sheets.Count
If Sheets(i).Range(Application.Caller.Address) = st Then cnt = cnt + 1
Next i
GetCnt = cnt
End Function
Ok,
change that function into:
Function GetCnt(st As String)
Application.Volatile
Dim cnt As Long
cnt = 0
For i = 2 To Sheets.Count
If Sheets(i).Range(Application.Caller.Address) = Ucase(st) Or Sheets(i).Range(Application.Caller.Address) = Lcase(st) Then cnt = cnt + 1
Next i
GetCnt = cnt
End Function
and let me know if it worked.
ciao
Bookmarks