Consulting

Results 1 to 2 of 2

Thread: If your search string isn't found...

  1. #1

    If your search string isn't found...

    Part of my macro works down a list of search strings, then does certain things with the string when it finds it.

    How can I tell it that if it doesn't find the first string, it should move on to the next one? I think I'm looking for something like

    [run search with first search term]
    If [search string found] Then
    [do stuff with selection]
    Else [move down one cell to the next search term]
    Loop


    ...if that makes sense. I'm just not sure about the syntax. Any ideas?

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Look at Find in VBA help, there is a good example there.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •