ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   sequential numbers (https://www.excelbanter.com/excel-discussion-misc-queries/36217-sequential-numbers.html)

AndrewRichardWood

sequential numbers
 
I simply want to sequentially number rows in a column. However, some of the
rows do not contain any data so do not need to be numbered. So there is in
fact a blank. It´s also possible that i´d want to add another row, and auto
update the number sequence. You cannot drag the auto numbering facility
across cells that you want to remain empty of course, because they will be
numbered.

Niek Otten

With your data in column A,:

Formula in B1 :1
In B2: =IF(A2="",B1,B1+1)
Fill down.
Format B2:
FormatConditional Formatting
Cell Value is, Equal to, B1 (remove the $signs if you clicked B1)
Choose a white font, so the number doesn't show
Use the format painter or Copy, Paste Special Format to format the rest of
the cells.

--
Kind regards,

Niek Otten

Microsoft MVP - Excel

"AndrewRichardWood" wrote in
message ...
I simply want to sequentially number rows in a column. However, some of
the
rows do not contain any data so do not need to be numbered. So there is
in
fact a blank. It´s also possible that i´d want to add another row, and
auto
update the number sequence. You cannot drag the auto numbering facility
across cells that you want to remain empty of course, because they will be
numbered.




Andy Wiggins

Here's a way using two helper columns.

1) in the first helper column, sequentially number every row.
2) sort the sheet so all the blank rows are at (say) the bottom
3) in the second helper column, sequentially number every row, apart from
the blank ones at the end
4) resort the sheet by the numbers in the first helper column
5) delete the first helper column, which leaves only the non-blank rows
sequentially numbered

--
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy
-

"AndrewRichardWood" wrote in
message ...
I simply want to sequentially number rows in a column. However, some of

the
rows do not contain any data so do not need to be numbered. So there is

in
fact a blank. It´s also possible that i´d want to add another row, and

auto
update the number sequence. You cannot drag the auto numbering facility
across cells that you want to remain empty of course, because they will be
numbered.





All times are GMT +1. The time now is 02:55 PM.

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