+ Reply to Thread
Results 1 to 5 of 5

Excel 2007 : Lookup/Vlookup using two Lookup values

  1. #1
    Registered User
    Join Date
    08-05-2009
    Location
    Buffalo, NY
    MS-Off Ver
    Excel 2007
    Posts
    70

    Lookup/Vlookup using two Lookup values

    The attached spreadsheet is a sales report (first tab) that we create with multiple customers who have multiple business lines. The second tab contains detaled data that shows payment deductions (charges) for each of those customers, by business line.

    The third tab is just a pivot table showing the total charges, by customer, by business line.

    I want to be able to lookup by customer number, the charge/deduction for each of the business lines. So I guess in essensce, since the cust# is not unique for each line, the lookup command has to look at the customer number AND the business line, then go over to the Pivot Table and see which charge amount matches the customer number and business line, and then return its value.

    I've researched the forums, and am becoming more confused as I go.

    Any help is appreciated.

    Thanks!
    Rick
    Attached Files Attached Files
    Last edited by Rick K; 09-16-2010 at 02:51 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: Lookup/Vlookup using two Lookup values

    Try:

    =SUMPRODUCT(--('CHARGE REPORT'!$C$2:$C$210=A2),--('CHARGE REPORT'!$D$2:$D$210=B2),'CHARGE REPORT'!$I$2:$I$210)

    or in 2007:

    =SUMIFS('CHARGE REPORT'!$I$2:$I$210,'CHARGE REPORT'!$C$2:$C$210,A2,'CHARGE REPORT'!$D$2:$D$210,B2)

    you can use the source data instead of the Pivot Report.
    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-05-2009
    Location
    Buffalo, NY
    MS-Off Ver
    Excel 2007
    Posts
    70

    Re: Lookup/Vlookup using two Lookup values

    You have GOT to be kidding! I messed with this formula for an hour! THANKS!!! Now I face a new question: The "charges" that were returned don't equal the total of the data on the charges tab. This means means that there were charge transactions on customers who don't show up on the sales report. Ugh.

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

    Re: Lookup/Vlookup using two Lookup values

    Can you give example of what you mean?

  5. #5
    Registered User
    Join Date
    08-05-2009
    Location
    Buffalo, NY
    MS-Off Ver
    Excel 2007
    Posts
    70

    Re: Lookup/Vlookup using two Lookup values

    I found the problem and how to fix it. What happens, is that there are customers who do not appear on the Sales Report, who have charges (the Charge Report) against their account, on different business lines. So all I had to do was compare the two reports to find out which customers fit this criteria.

    I really appreciate your assistance is helping me to figure this out. We pay commissions based on Net Sales (which what this report really calculates), and now we can proceed and be 100% accurate.

    Rick

+ 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