Excel: Calculate the first four cells based on condition


A B C D
x 16-03-2014 2
x 16-03-2014 3
x 16-03-2014 4
x 16-03-2014 5
x 16-03-2014 6
x 17-03-2014 7
x 17-03-2014 8
x 17-03-2014 9
x 17-03-2014 10
y 17-03-2014 1
In the above example, i want to sum the first four cells where data in column a and column b is matching and after summing the first four values, i want excel to sum the rest of the values for the matching data in column in a and b which not necessary would be 4, but will be less. I have the written the array formula for this using count if and sumifs but that is giving me the sum of total values. {=IF(COUNTIFS($A$2:$A3,A3,$B$2:$B3,B3)>1,"",SUMIFS(C:C,A:A,A3,B:B,B3))} Is it possible? Please help, i'm stuck :(


This question generated 43 answers. To proceed to the answers, click here.

This thread is current as of July 12, 2014.


For more resources for Microsoft Excel