ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   To sum by grouping (https://www.excelbanter.com/excel-discussion-misc-queries/216536-sum-grouping.html)

dan

To sum by grouping
 
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. Valko

To sum by grouping
 
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.

--
Biff
Microsoft Excel MVP


"Dan" <Dan @discussions.microsoft.com wrote in message
...
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.





All times are GMT +1. The time now is 04:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com