ransomedbyfire
Board Regular
- Joined
- Mar 9, 2011
- Messages
- 121
I have a sheet populated with VLookups that has been resorted alphabetically on column K.
I have written some code to try to find the first occurrence of the string "LB" in column K of this sheet. But, instead, the code keeps finding the seventh occurrence of this string, ignoring the first six, and thus defeating the purpose of my search. What's going wrong here, and how can I fix it?
End Sub
Thanks!
I have written some code to try to find the first occurrence of the string "LB" in column K of this sheet. But, instead, the code keeps finding the seventh occurrence of this string, ignoring the first six, and thus defeating the purpose of my search. What's going wrong here, and how can I fix it?
Code:
Sub rearrangeissues()
firstlb = Sheet3.Range("K:K").Find(what:="LB", after:=[k1], MatchCase:=True, LookIn:=xlValues).Row 'This line returns the number 25 when it should return 19.
Cells(firstlb, 1).Select
Call Sheet6.alphasort1
Thanks!