Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with a Find

Status
Not open for further replies.

rnordquest

New member
Joined
Jul 17, 2003
Messages
148
Location
US
I copied this find method from the Help file, modified it, and can't seem to get it to work. It returns the first "c" ($C$689 so I know it found it) but I can't get it to go there. I want it to find PN and replace the cells to the right with other data. What do I need to change?

Thanks,

Roger


With ActiveSheet.Range("C2:C65536")
Set c = .Find(PN, LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
Selection.Offset(0, 1).Select
ActiveCell = COL_F
Selection.Offset(0, 1).Select
ActiveCell = COL_H
Selection.Offset(0, 1).Select
ActiveCell = COL_I
Selection.Offset(0, 1).Select
ActiveCell = COL_G
Selection.Offset(0, -4).Select
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
 
After the Set c=.Find and the Set c=.FindNext, add a line c.Select

Cheers,
Joerd

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top