ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I auto-number rows in excel? (https://www.excelbanter.com/excel-programming/316693-how-do-i-auto-number-rows-excel.html)

Edstar1979

How do I auto-number rows in excel?
 
I am trying to create an invoice log where I need to number the cells. I have
been told that excel is capable of numbering the log itself. I would be very
grateful if somebody could inform me how.

JulieD

How do I auto-number rows in excel?
 
Hi

You can use the ROW() function to put a number against each line (row 1 will
get 1, row 2 will get 2 etc) .. and if you move lines around or insert lines
each line will automatically renumber. However, if you do insert lines, the
new line will be blank so you will have to either copy the line above or put
=ROW() in the cell that you want to use to number the rows.

Is this what you're after, or do your invoices have specific numbers and if
you insert rows do you really want you invoice numbers to change. If you'ld
like to provide more details maybe we can come up with a better solution.

Cheers
JulieD

"Edstar1979" wrote in message
...
I am trying to create an invoice log where I need to number the cells. I
have
been told that excel is capable of numbering the log itself. I would be
very
grateful if somebody could inform me how.




Frank Kabel

How do I auto-number rows in excel?
 
Hi
in A1 enter
=IF(B1<"",1,"")

in A2 enter
=IF(B2<"",MAX($A$1:OFFSET(A2,-1,0))+1,"")
and copy this formula down for as many rows as required. Now everytime
someone enters data in column B column A shows a ID value


--
Regards
Frank Kabel
Frankfurt, Germany


Edstar1979 wrote:
I am trying to create an invoice log where I need to number the
cells. I have been told that excel is capable of numbering the log
itself. I would be very grateful if somebody could inform me how.


JulieD

How do I auto-number rows in excel?
 
Hi Frank

just wondering what the benefit of this formula over
=ROW()
or even
=IF(B2<"",ROW(),"")

is ...
Cheers
JulieD

"Frank Kabel" wrote in message
...
Hi
in A1 enter
=IF(B1<"",1,"")

in A2 enter
=IF(B2<"",MAX($A$1:OFFSET(A2,-1,0))+1,"")
and copy this formula down for as many rows as required. Now everytime
someone enters data in column B column A shows a ID value


--
Regards
Frank Kabel
Frankfurt, Germany


Edstar1979 wrote:
I am trying to create an invoice log where I need to number the
cells. I have been told that excel is capable of numbering the log
itself. I would be very grateful if somebody could inform me how.




Frank Kabel

How do I auto-number rows in excel?
 
Hi Julie
one main benefit: It also deals with some blank rows in between and is
also robust regarding deleting rows in between. So if you always fill
your list from the top and have no blanks in between no benefit but the
drawback of a volatile function (OFFSET)

--
Regards
Frank Kabel
Frankfurt, Germany


JulieD wrote:
Hi Frank

just wondering what the benefit of this formula over
=ROW()
or even
=IF(B2<"",ROW(),"")

is ...
Cheers
JulieD

"Frank Kabel" wrote in message
...
Hi
in A1 enter
=IF(B1<"",1,"")

in A2 enter
=IF(B2<"",MAX($A$1:OFFSET(A2,-1,0))+1,"")
and copy this formula down for as many rows as required. Now
everytime someone enters data in column B column A shows a ID value


--
Regards
Frank Kabel
Frankfurt, Germany


Edstar1979 wrote:
I am trying to create an invoice log where I need to number the
cells. I have been told that excel is capable of numbering the log
itself. I would be very grateful if somebody could inform me how.




All times are GMT +1. The time now is 11:41 PM.

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