+ Reply to Thread
Results 1 to 3 of 3

Alternative to VLOOKUP to return multiple values with same item number

  1. #1
    Registered User
    Join Date
    08-31-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    2

    Alternative to VLOOKUP to return multiple values with same item number

    Hello, I have a spreadsheet that has to do with stone values for jewelry. I am not very good at excel, and the spreadsheet currently uses a lot of vlookups. Problem is, there are multiple instances where there are more than one stone for an item. I'm trying to get a total cost of the stones for each item, and obviously vlookup is only returning the first hit for each item number because that's its function.

    I know I have to use another function, but I can't figure out which one.

    This spreadsheet has 4 worksheets that work off each other, but my main concern is the first worksheet. It is an ODBC dump of our database which then does a lookup in the other tabs to total cost.

    This is the first lookup in tab 1, it is looking up the item in tab 2(FGs with Stones)


    =IF(ISNA(VLOOKUP($A2,'FGs with Stones'!$A:$AF,31,FALSE)),0,(VLOOKUP($A2,'FGs with Stones'!$A:$AF,31,FALSE)))


    If it finds the item in tab 2, it looks in the corresponding column to find the total cost for the stones in the finished piece. But when there is the same item number but with different stones, it only returns the first value. I need the function to total the cost when there is multiples and return it to the above cell.

    Example

    A2 has item number HB128331. The lookup looks in FGs with Stones and finds HB128331. This is what it looks like in the FGs with Stones tab

    HB128331 11.61
    HB128331 5.61
    HB128331 9.84

    But the VLOOKUP only finds 11.61 and returns it to the cell. I need to add all of those values up and return them to the formula cell in A2

    I have done some research and know that maybe SUMIF or one of the DB functions will work but I can't figure it out. Any help would be appreciated. Thank you

    If there is any other information you need, or need me to attach a sample I will of course, but I wanted to hold off because the information would have to be changed a little for our clients privacy and I thought it was possible someone would solve this without me needing to go through the trouble.

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Alternative to VLOOKUP to return multiple values with same item number

    Hi hollyw00d81,

    Try this instead:

    Please Login or Register  to view this content.
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Registered User
    Join Date
    08-31-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Alternative to VLOOKUP to return multiple values with same item number

    Thank you I will try it when I get the chance and let you know if there's an issue

+ 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