Excel User Group
Microsoft Excel blogs, forums, files. Read, ask questions, provide answers.

Matching criteria in 2 columns to look at a 3rd column of numbers to create a sum

Latest post Tue, Aug 10 2010 10:36 AM by Bob Phillips. 4 replies.
  • Mon, Aug 9 2010 6:19 PM

    • jimbo5129
    • Not Ranked
    • Joined on Mon, Aug 9 2010
    • Posts 2
    • Points 42

    Matching criteria in 2 columns to look at a 3rd column of numbers to create a sum

    Here is a typical row in the spreadsheet which is nearly 4000 rows of data:

            Description                       WBS           WBD                  Material                    Qty      Mea     Size

    |   Ball Valve, V600, 02      |    C12DO    |    F1804B   |   CARBON STEEL, PIPING   |    12   |   EA    |   1"   |

    Im trying to use the "Description" & "WBS" columns for the criteria to match.  There are multiple lines that

    are identical but the QTY column will be different.  I want to add those up from the Qty column when the criteria

    is met.

    Thank you for any help on this...driving me Crazy and thats a short drive for me!

    Jimbo

    • Post Points: 21
  • Tue, Aug 10 2010 9:18 AM In reply to

    Re: Matching criteria in 2 columns to look at a 3rd column of numbers to create a sum

    Try this array formula

     

    =INDEX(E:E,MATCH(1,(A1:A20="Ball Valve, V600, 02")*(B1:B20="C12DO"),0))

    Regards

    Bob

    • Post Points: 21
  • Tue, Aug 10 2010 10:14 AM In reply to

    • Omar
    • Top 10 Contributor
    • Joined on Sat, Jan 12 2008
    • Kitchener, ON
    • Posts 128
    • Points 1,823

    Re: Matching criteria in 2 columns to look at a 3rd column of numbers to create a sum

    That's an interested technique, Bob. I didn't realize that Index/match would return a sum when you did that as an array formula.

    This problem has several different solutions. I was expecting someone to answer with a SUMPRODUCT() formula. In 2007, I think the easiest choice now is SUMIFS().

    Omar Freeman Kitchener, ON

    • Post Points: 21
  • Tue, Aug 10 2010 10:23 AM In reply to

    • jimbo5129
    • Not Ranked
    • Joined on Mon, Aug 9 2010
    • Posts 2
    • Points 42

    Re: Matching criteria in 2 columns to look at a 3rd column of numbers to create a sum

    Thank you for working with me.

     I need to be able to use a cell reference instead of typing in the description like “Ball Valve, V600, 02”.  Same for the C12DO… need to be able to use a cell reference.  What Im trying to do is like if the criteria is met for both instances in a row then take the number in the row that is located in column J (Quantity).  So everytime this criteria is met in a row I want to be able to add the quantities up for all rows that match:

                Ball Valve, V600, 02”      (Column C)

                C12DO                          (Column D)

     I apologize for having problems explaining this… let me know if there is any other info you may need

    • Post Points: 21
  • Tue, Aug 10 2010 10:36 AM In reply to

    Re: Matching criteria in 2 columns to look at a 3rd column of numbers to create a sum

    If there can be multiple matches, then use

    =SUMPRODUCT(--(C1:C20=desc_cell),--(D1:D20=WBS_cell),G1:G20)

    Regards

    Bob

    • Post Points: 5
Page 1 of 1 (5 items) | RSS
Copyright Excel User Group and the relevant contributors, 2010. All Trade Marks acknowledged. This site is a peer-to-peer site and NOT affiliated in any way to Microsoft Corp. All rights reserved.