Hiya All
I have a worksheet with functions created by the user called =PutValues(), what i am trying to do is write some code to find these function and count how many are on the worksheek. I have something like 30 worksheets full of them. i have wrote the following code:
Any help wil be much appreciated
I have a worksheet with functions created by the user called =PutValues(), what i am trying to do is write some code to find these function and count how many are on the worksheek. I have something like 30 worksheets full of them. i have wrote the following code:
Code:
Public Function PutValueOccurrence(strPutValueStartingPoint As String, intRowCount) As Integer
Dim intI, intFound As Integer
Dim strFindItem As String
Dim lCount As Long
strFindItem = "PutValues"
Range("A1").Select
For lCount = 1 To intRowCount
Range("A" & lCount).Select
If Rows.Find(What:=strFindItem, After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False) = "PutValues" Then
MsgBox "Found"
intFound = 1 + intFound
Else
MsgBox ActiveCell.Address
End If
Next
PutValueOccurrence = intFound
End Function
Any help wil be much appreciated