Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross 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
Jul 17, 2003
148
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
 
Replies continue below

Recommended for you

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