×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Help with a Find

Help with a Find

Help with a Find

(OP)
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

RE: Help with a Find

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources