+ Reply to Thread
Results 1 to 7 of 7

Search cells in column for any of three possible values?

  1. #1
    Registered User
    Join Date
    03-25-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    61

    Search cells in column for any of three possible values?

    I apologize in advance for having no VBA knowledge or skills!

    Basically, I want to check/search the cells in a column one by one, and keep checking/searching until a match of any of three possible values is found.

    I know (sort of) how to do this for just one value, but I don't know how to do it for three possible values!

    I thought of using a do-until loop that runs as long as the current cell's value is not equal to the three possible values, but I wasn't able to get that to work...

    Any other suggestions?

    Thanks for your help!

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Search cells in column for any of three possible values?

    Share your current code

    Also the criteria's to match


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    03-25-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Search cells in column for any of three possible values?

    Well, the code I had that doesn't work is this:

    Do While (matchValid <> "Building") Or (matchValid <> "Integrating") Or (matchValid <> "Total")
    For matchCounter = 1 To 10
    Set matchValid = matchValid.Offset(1, 0)
    Next matchCounter
    Loop


    Thanks!
    Last edited by hadamhiram; 03-31-2015 at 03:27 AM.

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Search cells in column for any of three possible values?

    I don't know what is the use of For Loop?

    Since you have not used matchCounter inside the For Loop

  5. #5
    Registered User
    Join Date
    03-25-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Search cells in column for any of three possible values?

    I just copied some code I found online that I guessed might work, but it doesn't I'm not sure what the best approach to the problem is. Maybe it isn't a do-while loop at all, I really don't know. Again, what I want to do is check/search the cells in a column one by one, and keep checking/searching until a match of any of three possible values is found. Any suggestions?

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Search cells in column for any of three possible values?

    Check whether this helps you

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    03-25-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Search cells in column for any of three possible values?

    I will try it now - thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] the code is finding repeated values but i need to search values from E column to D
    By baig123 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-14-2014, 01:33 AM
  2. [SOLVED] Search cells to put all values in one column
    By HHR in forum Excel General
    Replies: 5
    Last Post: 11-01-2013, 01:04 PM
  3. [SOLVED] Search for multiple string values in the first row of a table and format column values.
    By Excel_junky in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-12-2013, 12:48 PM
  4. Replies: 4
    Last Post: 12-21-2012, 10:35 AM
  5. Replies: 3
    Last Post: 01-10-2006, 06:10 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1