+ Reply to Thread
Results 1 to 4 of 4

To return multiple value using VLOOKUP function

  1. #1
    Registered User
    Join Date
    10-27-2010
    Location
    Mumbai
    MS-Off Ver
    Excel 2003
    Posts
    6

    To return multiple value using VLOOKUP function

    Hi,
    I got stuck when trying to check a matching value in multiple rows using VLOOKUP(...) function.
    I have attached excel file for reference. Please solve it as soon as possible. Its urgent.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    05-13-2011
    Location
    New Zealander in London
    MS-Off Ver
    Excel 2007
    Posts
    74

    Re: To return multiple value using VLOOKUP function

    The problem with VLOOKUP is that it expects data to be sorted in Ascending order to work. Your formula will work if you sort the data in Columns A and then B of your lookup range.

  3. #3
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: To return multiple value using VLOOKUP function

    Try using this formula for D9 and down

    =IF(COUNTIF($A$2:$A$6,B9),IF(COUNTIFS($A$2:$A$6,B9,$B$2:$B$6,"Blue"),"Y","N"),"NF")

  4. #4
    Registered User
    Join Date
    05-13-2011
    Location
    New Zealander in London
    MS-Off Ver
    Excel 2007
    Posts
    74

    Re: To return multiple value using VLOOKUP function

    Actually my solution above is incorrect. I am guessing you are eventually wanting to return the Price for each, so this is what the following does for you.

    If you add in another column between B and C with the formula:
    =CONCATENATE(A2,B2)
    ...copied down for all values in the table

    Then for cell D9 (under the heading of Check Red) put in the formula:
    =IF(ISERROR(VLOOKUP(B9&"Red",$C$2:$D$6,2,FALSE)),"NF",VLOOKUP(B9&"Red",$C$2:$D$6,2,FALSE))

    Now you can copy that down for all Check Red items, and copy across (fixing the formula) for the Check Blue column.

    Finally you can hide the new column C with the CONCATENATEs.

+ 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