Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Auto updating list... | Excel Worksheet Functions | |||
Updating List | Excel Discussion (Misc queries) | |||
Auto-updating top-list. | Excel Discussion (Misc queries) | |||
list box updating itself | Excel Programming | |||
Updating a list | Excel Discussion (Misc queries) |