+ Reply to Thread
Results 1 to 5 of 5

If Cell Text Matches Any Text From Range, Then Apply VLOOKUP?

  1. #1
    Registered User
    Join Date
    04-12-2013
    Location
    Austin
    MS-Off Ver
    Excel 2010
    Posts
    2

    If Cell Text Matches Any Text From Range, Then Apply VLOOKUP?

    Please Login or Register  to view this content.
    I feel like I'm on the right track with the above code, but I need "Results!C1" to equal any cell from a range instead of just cell "Picks!B94" (i.e. B94:G94). Any help would be greatly appreciated. I have attached the spreadsheet as well.

    Book1.xlsx

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    51,807

    Re: If Cell Text Matches Any Text From Range, Then Apply VLOOKUP?

    Hi and welcome to the forum

    perhaps if you can explain exactly what you are trying to do, we can offer some better suggstions for you to try?

    looking at your sheet1, you have identical names in columns for each of your rows?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Guru Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: If Cell Text Matches Any Text From Range, Then Apply VLOOKUP?

    Try this...

    Entered in C2:

    =IF(COUNTIF(Picks!$B94:$G94,C$1),VLOOKUP(C$1,scores,2,0),"")

    Copy across then down as needed.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    04-12-2013
    Location
    Austin
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: If Cell Text Matches Any Text From Range, Then Apply VLOOKUP?

    Quote Originally Posted by Tony Valko View Post
    Try this...

    Entered in C2:

    =IF(COUNTIF(Picks!$B94:$G94,C$1),VLOOKUP(C$1,scores,2,0),"")

    Copy across then down as needed.
    Works perfectly. I had no idea COUNTIF could do that. I've only used it for... well, counting. Thanks again!

  5. #5
    Forum Guru Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: If Cell Text Matches Any Text From Range, Then Apply VLOOKUP?

    You're welcome. Thanks for the feedback!

+ 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