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
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,Originally Posted by CanMan12
change that function into:
and let me know if it worked.![]()
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
ciao
Worked like a charm! Thank you very much!
You are welcome.Originally Posted by CanMan12
ciao
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks