![]() |
updating a list
The row() function works well but if the line is deleted I guess I would
need a loop to update the list. any ideas on how to code this simple loop. "Greg Wilson" wrote in message ... I would just go with the Row() worksheet function. Assuming the Item# numbering starts in cell A1 then just put "=Row()" in A1 and fill down. If it starts in A5 then subtract an offset: "=Row() - 4". If rows are added, you can just fill the gap manually by filling down. One can always use a loop of course. I'll leave that to someone else. Regards, Greg "dbretzer" wrote: I have a spreadsheet set up in the following manner: Item# Data#1 Data#2 1 .2 .9 2 3 0.5 3 170 170 4 0 -.2 What I am trying to do is set up the Item# list to be able automatically re-adjust if a line is deleted. For example, if Item#1 is deleted(along with its data) then line 2 would become 1and so on . Any suggestions would be greatly appreciated. |
updating a list
I had assumed you meant that the entire row may get deleted. If so, the Item#
numbering containing the Row() function should fix itself. If you meant that only the contents of the row may get deleted leaving a gap in Item#, Data1 and Data2, then I think that programmatically deleting the entire row is the way to go. Clarification needed. Regards, Greg "dbretzer" wrote: The row() function works well but if the line is deleted I guess I would need a loop to update the list. any ideas on how to code this simple loop. "Greg Wilson" wrote in message ... I would just go with the Row() worksheet function. Assuming the Item# numbering starts in cell A1 then just put "=Row()" in A1 and fill down. If it starts in A5 then subtract an offset: "=Row() - 4". If rows are added, you can just fill the gap manually by filling down. One can always use a loop of course. I'll leave that to someone else. Regards, Greg "dbretzer" wrote: I have a spreadsheet set up in the following manner: Item# Data#1 Data#2 1 .2 .9 2 3 0.5 3 170 170 4 0 -.2 What I am trying to do is set up the Item# list to be able automatically re-adjust if a line is deleted. For example, if Item#1 is deleted(along with its data) then line 2 would become 1and so on . Any suggestions would be greatly appreciated. |
All times are GMT +1. The time now is 03:01 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com