ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   When I subtotal in Excel how can I count the number of subtotals? (https://www.excelbanter.com/excel-discussion-misc-queries/24225-when-i-subtotal-excel-how-can-i-count-number-subtotals.html)

Karen S.

When I subtotal in Excel how can I count the number of subtotals?
 
I subtotal my current balance on address and then I want to count how many
distinct addresses there are

Peo Sjoblom

If you total for every change in address then each distinct address would be
the same as each Total? So

=SUMPRODUCT(--(ISNUMBER(FIND("Total",A1:A300))))-1

the minus 1 at the end is for the gran total that shoudn't be counted, or
just copy all the addresses somewhere else and use a formula on thos addresses

=SUM(1/COUNTIF(A2:A300,A2:A300))

entered with ctrl + shift & enter

Regards,

Peo Sjoblom




"Karen S." wrote:

I subtotal my current balance on address and then I want to count how many
distinct addresses there are



All times are GMT +1. The time now is 05:35 AM.

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