Count subtotal lines

D

Debbie

I have a large spreadsheet that I subtotal. After
subtotalling, the subtotal amount appears in column D
leaving A-C as empty cells. I want to add a new column A
and then number JUST the subtotals 1 thru ? in ascending
order automatically in the new column A. I am working
with an IF statement so far =IF(isblank(B10),.... then
what? The first subtotal might be in row 5, the next in
row 11, etc. I can get the formula to enter #1 in each of
the subtotal rows but not 1,2,3,4,5 etc. Thank you in
advance for any advice you may have.
 
D

Debra Dalgleish

Enter the following formula in cell A2:

=IF(B2<>"","",MAX(A$1:A1)+1)

and copy down to the last row of the table.
 

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