I have written the following code:
Function Find_Index(Gender As String)
Dim Index As Long
Do While Gender = Worksheets("Source").Cells(Index, "A").Text
Index = Index + 1
Loop
Find_Index = Index
End Function
I'm getting the following error:
"Application-defined or object-defined error"
Due to the following line in the code:
Do While Gender = Worksheets("Source").Cells(Index, "A").Text
Any ideas why ?