I have a pivot table that displays the history of multiple account over some period of time, where the account total is a row header and the times are listed below in separate rows. This then repeats for multiple other accounts. Is it possible to get summary stats such as the mean, standard deviation, and so on for each row header? The only way I know of is to 'summarize values as', but in this case that will summarize for each time period and not for all time periods per account.

One method I have considered is copying the pivot table over to a regular cell range. In my particular case each row header has a number less than 3000 while all dates are greater than 3000, so I can create an if statement so that =IF(A2<3000,1,0). With this I can then tell Excel to sum all values for which the cell is zero until it encounters a 1, at which point it should begin the count again. I imagine this can be done using VBA, so I just need to determine how to actually set up that code. Thanks!