Compare Multiple Columns & Sum

  • Thread starter Thread starter Ken
  • Start date Start date
K

Ken

In Col F I need a formula to compare "unique records" in
Cols D&E against records in Cols A&B ... if "same" I need
to "Sum" values in Col C ... I know how to compare on
single fields, but not multiple fields ... As always my
sincere Thanks to the many Magicians on this Board ... K

ie: Unique
(Records A&B) (Sum)
Col A Col B Col C Col D Col E | Col F
|
AAAA B 6 AAAA | 4
BBBB CJ 3 AAAA B | 11
AAAA 4 BBBB | 1
CCCC A 7 BBBB CJ | 6
CCCC 4 CCCC | 6
BBBB 1 CCCC A | 7
BBBB CJ 3 |
CCCC A 2 |
AAAA B 5 |
 
Assuming your data starts on row 2 and goes to row 200, in cell F2 put the following formula:-

=SUMPRODUCT(($A$2:$A$200=D41)*($B$2:$B$200=E41))

Then just copy it down.
 
Back
Top