+ Reply to Thread
Results 1 to 4 of 4

Search for a match

  1. #1
    Forum Contributor
    Join Date
    05-12-2009
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    219

    Search for a match

    Hi All,

    I have data in col A and col B. For each value in each cell in col B, I want to search in col A to see if there is a match. If there is a match then in associated col C put “Yes” otherwise put “NO”. Repeat the same step for all other values in col B.

    Thanks All,

    VBisgreat

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,318

    Re: Search for a match

    How about in column C...

    =IF(MATCH(B1,$A$1:$A$100,0),"Yes","No")

    You could also name the range in column A which would look like.

    =IF(MATCH(B1,names,0),"Yes","No")

    The named range is equal to names
    HTH
    Regards, Jeff

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Search for a match

    Hey VBisGreat,

    No need for Visual Basic on this one. Try a countif function and see the attached for your answer.

    What version of Excel are you using? Your profile says 2003. I'd assume you have the latest if you are digging into VBA. I believe the Help files are a lot better in 2010 Excel for VBA, which might help you learn more.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Forum Contributor
    Join Date
    05-12-2009
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    219

    Re: Search for a match

    Thanks all
    VBisgreat!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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