Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Perhaps this is a dumb Q, but a brief experiment looking at ranges in
Immediate Window causes me to ask this question. Will the following (with correct syntax) cause an endless loop since the cells shifting into the range will be empty? range = a1:a10 (for example) for each empty cell in range, delete the row a11, a12, etc are in fact empty. Thanks! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No, it will cause you to miss some cells. for example, if rows 2, 3 and 4
are emty, it will delete 2 and 4 and miss 3. Usually one loops from higher to lower for i = 10 to 1 step -2 if isempty(cells(i,1)) then rows(i).Delete End if Next -- Regards, Tom Ogilvy "dick" wrote in message ps.com... Perhaps this is a dumb Q, but a brief experiment looking at ranges in Immediate Window causes me to ask this question. Will the following (with correct syntax) cause an endless loop since the cells shifting into the range will be empty? range = a1:a10 (for example) for each empty cell in range, delete the row a11, a12, etc are in fact empty. Thanks! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
got the idea, but, why step -2 instead of -1 ?
|
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It should be step -1. Sorry. Guess I had 2 still on the mind from the
exciting explantion I gave <g. -- Regards, Tom Ogilvy "dick" wrote in message oups.com... got the idea, but, why step -2 instead of -1 ? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Endless spreadsheet calculations | Excel Discussion (Misc queries) | |||
file won't open, endless loop, autorecover | Excel Discussion (Misc queries) | |||
How can I make endless row, beyond IV column? | New Users to Excel | |||
Interrupting an endless loop | Excel Programming | |||
Endless Loop when using ComboBox1.BoundColumn = 2 | Excel Programming |