+ Reply to Thread
Results 1 to 11 of 11

How can I tell Match to return "text content" in cell instead of where it's located?

  1. #1
    Registered User
    Join Date
    11-24-2011
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2007
    Posts
    4

    How can I tell Match to return "text content" in cell instead of where it's located?

    Hi, I'm trying to use Vlookup & Match combination to grab text content in cells but it's not working well and I would like someone to help. I have List A, List B and List C. I'm trying to see if an item in list A occurs in List B. If it does, I want Vlookup to grab applicable item from List C and show it in another cell. Match will give me the location of the item in List B, but it does not return the content of the cell. Vlookup & Match combination will give me content of a wrong cell. I have example below:

    List A List B List C
    18AP NAN-A aa-21C
    182ES 18AP za-11C
    43TH3 042SP ey-31C

    1. Comparing A list to B: Match for "18AP" is "2" for 2nd row. The code I need in List C is za-11C and it's correct. But my spreadsheet is 5K long and I don't want to count.
    2. Vlookup will return "aa-21" but it's not the correct code.

    How do I tell formula to get the correct code? Am I using a wrong combination? Any guidance is appreciated!

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: How can I tell Match to return "text content" in cell instead of where it's located?

    What's the formula you're using?
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    11-24-2011
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: How can I tell Match to return "text content" in cell instead of where it's located?

    =VLOOKUP(A2,A1:C4,MATCH("c",A1:C1),FALSE)

  4. #4
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: How can I tell Match to return "text content" in cell instead of where it's located?

    try:

    =index($c$2:$c$4,match($a2,$b$2:$b$4,0))

    or, you could also use your formula with a slight change:

    =VLOOKUP($A2,$B$2:$C$4,2,FALSE)
    Last edited by icestationzbra; 06-09-2012 at 05:02 PM.
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  5. #5
    Registered User
    Join Date
    11-24-2011
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: How can I tell Match to return "text content" in cell instead of where it's located?

    Worked! Thanks a million. Now, I need to go study up on Index function!

  6. #6
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: How can I tell Match to return "text content" in cell instead of where it's located?

    you are welcome.

    that's a good idea to 'look up' the INDEX function (pun not intended). it has many more features than VLOOKUP and is much more extensible. good tool to have in your panoply.

  7. #7
    Registered User
    Join Date
    11-24-2011
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: How can I tell Match to return "text content" in cell instead of where it's located?

    Thanks, again! I had spent several hours trying to figure this out since early a.m.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: How can I tell Match to return "text content" in cell instead of where it's located?

    icestationzebra, where can i get me 1 of those panoplolies??? and preferably 1 with lotsa stuff thats has been indexed?
    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

  9. #9
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: How can I tell Match to return "text content" in cell instead of where it's located?

    @fdibbins: that's easy, one of two ways to get it - either steal it from the likes of NBVC... or, (l)earn by doing the hard yards...

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: How can I tell Match to return "text content" in cell instead of where it's located?

    good advice, you think shg would notice his missing too?

  11. #11
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: How can I tell Match to return "text content" in cell instead of where it's located?

    he is not as active here as he used to be, so he may not notice that his is missing from here :P

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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