Subtotals every "X" number of rows

C

clh

Is there a quick, easy way in Excel to do subtotals ever certain number of
rows? In my case I need subtotals every 15 rows. Oh, this is Excel 2003.

I know how to use the Subtotals tool but the only option there seems to be
subtotals based on the change in values of a column. In my case I don't care
about the values of any columns, I just need the subtotals every 15 rows.

Of course I could do this manually, but I'm hoping there's a quick and easy
way to do it similar to how the built-in Subtotals tool works.

Thank you.
 
P

Pete_UK

In a helper column you could put this formula on row 1:

=INT(ROW()/15)

and copy it down. It will give you 15 zeros, followed by 15 ones, then
15 twos etc, so you could use the Data | Subtotals feature using this
column to determine where the subtotals should go (i.e. for each
change in this column ...).

Hope this helps.

Pete
 
P

Pete_UK

Sorry, it should really be:

=INT((ROW()-1)/15)

to give you 15 zeros from row 1.

Pete
 
S

Sheeloo

One way is with a helper column ;
Enter this in a helper Col (say Col B)
=MOD(Row(),15) and copy down

Then you can use the following to SUM the value in Col A for every 15th row
=SUMPRODUCT(A1:A25,--(B1:B25=1))
 

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