+ Reply to Thread
Results 1 to 4 of 4

LOOKUP data in multiple columns to sum values in corresponding cells

  1. #1
    Forum Contributor
    Join Date
    06-21-2014
    Location
    Brighton
    MS-Off Ver
    2011
    Posts
    115

    Question LOOKUP data in multiple columns to sum values in corresponding cells

    Hi Excel Forum,

    Looking for help please.

    I have a large list of data.
    In this case its an order book containing multiple columns of data such as Order #, Product #, Size, Qty, Price, Total Price, etc).

    Each row in this data sheet is an individual SKU.

    I need to get a copy of this data on a 2nd worksheet but instead of listing the rows by SKU, to group matching Order #'s & Product #'s together & Sum the qty.

    I think I should be using something like LOOKUP, VLOOKUP, SUMIF, SUMIFS (or similar formulas) to do so?

    I've attached the example excel file.
    There are x2 tabs.
    1st Tab "Data" being an example of the original raw data.
    2nd Tab "result" being what I'm trying to achieve.

    Any help would be GREATLY appreciated.

    http://www.excelforum.com/attachment...1&d=1461089264
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: LOOKUP data in multiple columns to sum values in corresponding cells

    See attached using helper columns:

    in Data

    in G2 =A2&B2

    in H2 =COUNTIF($G$2:G2,G2)

    In Results

    in A2 =IFERROR(INDEX(Data!A:A,SMALL(IF(Data!$H$2:$H$9=1,ROW($A$2:$A$9),""),ROWS($A$2:A2))),"")

    in B2 =IFERROR(INDEX(Data!B:B,SMALL(IF(Data!$H$2:$H$9=1,ROW($A$2:$A$9),""),ROWS($A$2:B2))),"")

    Enter both the abocve with Ctrl+Shift+Enter

    in C2 =SUMIF(Data!$G$2:$G$9,"=" & $A2&$B2,Data!$D$2:$D$9)

    in D2 =INDEX(Data!$E$2:$E$9,MATCH(1,INDEX((Data!$A$2:$A$9=Result!$A2)*(Data!$B$2:$B$9=Result!$B2),0),0))

    in E2 = C2 * D2
    Attached Files Attached Files

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: LOOKUP data in multiple columns to sum values in corresponding cells

    Start with cell B2 on sheet Results

    in B2 and copy down

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    in A2 and copy down

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    in C2 and copy down

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    in D2 and copy down

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    in E2 and copy down

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    v A B C D E
    1 Order Number Line Number Qty Price Total
    2 100123 SS-123 70 5 350
    3 100123 SS-124 70 10 700
    4 100124 SS-125 50 15 750
    5 100124 SS-126 50 5 250
    Attached Files Attached Files
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Forum Contributor
    Join Date
    06-21-2014
    Location
    Brighton
    MS-Off Ver
    2011
    Posts
    115

    Re: LOOKUP data in multiple columns to sum values in corresponding cells

    WOW, thank you so much.

    Really clever idea using the countif statement.
    There's no way my excel knowledge could have achieved this.

    EVERY DAY IS A SCHOOL DAY!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. lookup values in multiple columns
    By bacardi510 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 09-19-2014, 04:49 AM
  2. lookup values from multiple columns
    By peter525 in forum Excel General
    Replies: 12
    Last Post: 07-15-2014, 01:20 AM
  3. Replies: 3
    Last Post: 04-08-2014, 03:11 AM
  4. Formula to lookup multiple text values in multiple columns
    By karimk in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-04-2013, 05:33 AM
  5. lookup multiple values in multiple columns to return a result
    By AYAHOO123 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-11-2013, 07:53 PM
  6. [SOLVED] How can I lookup values from multiple columns
    By dhiresh in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-23-2013, 12:26 PM
  7. Sum values from multiple cells - multiple lookup values in single cell
    By taxdept in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-21-2012, 04:12 PM

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