ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   item numbers in a list that update if a row is deleted (https://www.excelbanter.com/excel-discussion-misc-queries/109960-item-numbers-list-update-if-row-deleted.html)

hot dogs

item numbers in a list that update if a row is deleted
 
I have a list of data, in the left column I have an item number for each row.
If I remove a row I need the item number to update. At present if I remove
row 4 then the item no. column will read 1,2,3,5,6,7 (and miss out 4), but i
need the item no. column to read 1,2,3,4,5,6. It would be useful if I could
have the first row as row 1 (as this will not be deleted) and have a formula
in each item no. cell that calculates 'the value in the cell above +1'. Does
anybody now of how to create a formula like this?

Dave O

item numbers in a list that update if a row is deleted
 
Instead of the formula =previous cell + 1, how about =ROW() . This
returns the row number on which the formula is entered if the () is
blank, or the row number of a reference, as in =ROW(A2), which returns
2.


hot dogs

item numbers in a list that update if a row is deleted
 
Cheers dave, this works fine.

"Dave O" wrote:

Instead of the formula =previous cell + 1, how about =ROW() . This
returns the row number on which the formula is entered if the () is
blank, or the row number of a reference, as in =ROW(A2), which returns
2.




All times are GMT +1. The time now is 05:06 AM.

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