Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default "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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default "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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default "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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default "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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help displaying "Maximum" or "Minimum" if cell is max or min in a group? RussAllison Excel Discussion (Misc queries) 1 February 24th 11 02:22 AM
How do i enable "Group" & "Ungroup" in a protected sheet DBLA137 Excel Discussion (Misc queries) 1 March 11th 09 12:20 AM
=IF(VLOOKUP(C11,Group,2,FALSE)=D11,"True","Not Valid") and =IF(D1 Milky Excel Worksheet Functions 1 August 20th 08 08:38 PM
How to "return" the array element number in VBA EagleOne Excel Discussion (Misc queries) 4 December 12th 06 10:30 PM
How do i enable "Group" & "Ungroup" in a protected sheet ruddojo Excel Discussion (Misc queries) 0 June 2nd 06 01:01 AM


All times are GMT +1. The time now is 03:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"