Auto Numbering in Excel

S

Sue

Hi

Can anyone please tell me if it is possible to
automatically number rows in an excel spreadsheet.

Eg: 1
1.1
1.2
2
2.1....etc

However there will be blank rows in between the numbered
list. At the moment I am manually entering the numbers
but then if I need to insert an additional section, I have
to manually change all the following numbers. Is there
any easy way to auto number in excel. Any help/advice
most welcome.

Thanking you in anticipation.
 
D

Dave Peterson

Maybe you could use a formula.

I put 1 in A1 and this in A2 and dragged down:

=IF(A1="",INT(MAX($A$1:A1))+1,IF(B2="","",MAX($A$1:A1)+0.1))

If the row above looks blank, start a new series (x+1)
otherwise if the cell in column B is empty, show nothing.
otherwise add .1 to the previous sequence.


(just don't have two consecutive blank rows)

I got this with some test data:

1 qwerq

2 qerq
2.1 asdf
2.2 qewrq
2.3 we

3 qwer

4 qwer

5 qwer
5.1 qwer
5.2 qwer

6 qwer
6.1 qwer
6.2 qwer
 
G

Guest

Hi

Thanks for that. Level 1 numbering works OK. How do it
get it to change to 1.1, 1.2, 2.1, 2.2....etc.

Your help is most appreciated.

Sue
 
D

Dave Peterson

Leave a single empty row.

If you mean that 3 is skipped and 3.1 is the start...

Put 1.1 in A1 and this in A2
=IF(A1="",INT(MAX($A$1:A1))+1.1,IF(B2="","",MAX($A$1:A1)+0.1))
and drag down.

I just added 1.1 instead of 1 in the existing formula.

===
I think if I were setting something like this up, I'd be worried about what
comes after 3.9.

Maybe putting 1.01 in A1 and this in A2
=IF(A1="",INT(MAX($A$1:A1))+1.01,IF(B2="","",MAX($A$1:A1)+0.01))
and drag down

would be slightly safer.
 

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