To sum by grouping

D

Dan

Col A has the following:
A1 - XXX
A2-YYY
A3-ZZZ
A4-XXX
A5-CCC
A6-YYY
B1 to B6 has dates in the date format. I want to sum Col B (to find out the
days lapsed) for XXX, YYY, ZZZ etc....
I sorted col A but do not know the formula to do the above. Please help.
 
T

T. Valko

Maybe this array formula** :

=MAX(IF(A1:A6="xxx",B1:B6))-MIN(IF(A1:A6="xxx",B1:B6))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top