Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
"for each element in group" question
Hi all
I want to use a "for each element in group" construct. How can I go back one element during excecution, e.g. if case1 then "go back one element". Thanks for your help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
"for each element in group" question
Hi
post your existing code. General idea: store the last value in a tempory variable -----Original Message----- Hi all I want to use a "for each element in group" construct. How can I go back one element during excecution, e.g. if case1 then "go back one element". Thanks for your help. . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
"for each element in group" question
Hi Frank
For Each cell In Intersect(ActiveSheet.UsedRange, Range ("B:B")) If IsError(cell.Value) Then Rows(cell.Row).Delete Shift:=xlUp 'go back one element, e.g. cell.index = cell.index- 1 End If Next cell I'll try to solve this in another way, just wonder whether how one can do this in this type of setup -----Original Message----- Hi post your existing code. General idea: store the last value in a tempory variable -----Original Message----- Hi all I want to use a "for each element in group" construct. How can I go back one element during excecution, e.g. if case1 then "go back one element". Thanks for your help. . . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
"for each element in group" question
Not aware of anyway to do that using For Each.
Most use a For i = Lastrow to Firstrow Step -1 when deleting rows. -- Regards, Tom Ogilvy "Claude" wrote in message ... Hi Frank For Each cell In Intersect(ActiveSheet.UsedRange, Range ("B:B")) If IsError(cell.Value) Then Rows(cell.Row).Delete Shift:=xlUp 'go back one element, e.g. cell.index = cell.index- 1 End If Next cell I'll try to solve this in another way, just wonder whether how one can do this in this type of setup -----Original Message----- Hi post your existing code. General idea: store the last value in a tempory variable -----Original Message----- Hi all I want to use a "for each element in group" construct. How can I go back one element during excecution, e.g. if case1 then "go back one element". Thanks for your help. . . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help displaying "Maximum" or "Minimum" if cell is max or min in a group? | Excel Discussion (Misc queries) | |||
How do i enable "Group" & "Ungroup" in a protected sheet | Excel Discussion (Misc queries) | |||
=IF(VLOOKUP(C11,Group,2,FALSE)=D11,"True","Not Valid") and =IF(D1 | Excel Worksheet Functions | |||
How to "return" the array element number in VBA | Excel Discussion (Misc queries) | |||
How do i enable "Group" & "Ungroup" in a protected sheet | Excel Discussion (Misc queries) |