I am getting an ID from a list box and then scanning through an excel sheet (ID) to find out if that ID exists or not. If it doesn’t I have to add it in the end. If it does, I have to find out which row that ID is present.
I am looping this way
count = 1
count1=1
While (Worksheets("ID").Cells(Count, 1) <> "")
If StrComp(Worksheets("ID").Cells(Count, 2), list1.Value, vbTextCompare = 1) Then
count1=count
count = count +1
You could try using FInd to look at column B for a single case-insenstive match on the whole string, ie
Update: If you were running the find from the active X control directly then: