PDA

View Full Version : Find Function excel VBA Help



hakunamatata
09-15-2012, 05:31 AM
Hello Everybody,
I have written the macro without Find function i want to change it using Find function. For the sake of example i have attached the workbook with this thread.

patel
09-16-2012, 12:07 AM
You used find method
....................
With Sheets("Sheet2").Range("C11:C" & LR2) 'This with statement should be like this With Sheets("Sheet2").Range(Name.Column & LR2)
Set c = .Find(aname, LookIn:=xlValues, Lookat:=xlPart) 'Whole)
If Not c Is Nothing Then
firstAddress = c.Row
Do
Set c = .FindNext(c)
............................