+ Reply to Thread
Results 1 to 4 of 4

VLOOKUP based on two cells

  1. #1
    Registered User
    Join Date
    08-26-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    9

    VLOOKUP based on two cells

    Hi,

    I have a spreadsheet that looks like this: (bear in mind, the "|" is the edge of the column
    Please Login or Register  to view this content.
    Then I have another sheet called Quantities which a similar structure..

    The VLOOKUP works, but if I have a duplicate name, like in the above table "MAXI DRESS" - the formulas get confused.

    How can I make my VLOOKUP take into account the NAME and the COLOR when it's looking up Quantities?
    Last edited by NBVC; 11-30-2009 at 03:39 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: VLOOKUP based on two cells

    If you are looking up quantities..then you can use Sumproduct

    e.g

    =Sumproduct(--('Quantities'!$A$1:$A$100=$A3),--('Quantities'!$B$1:$B$100=$B3),$C$1:$C$100)

    where Quantities!A1:A100 contain the database of Names
    B1:B100 the Colors
    C1:C100 the quantities

    And A3 and B3 are the lookup Name and Colour to find
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    08-26-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: VLOOKUP based on two cells

    Yay! That worked great! I still don't yet understand how, but I'm figuring it out slowly

    Thanks for your help!

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: VLOOKUP based on two cells

    Sumproduct() is a very flexible function...

    ... check out this article for the uses of Sumproduct and how it was used here.

    http://www.xldynamic.com/source/xld.SUMPRODUCT.html

+ 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