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
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