View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
cereldine[_34_] cereldine[_34_] is offline
external usenet poster
 
Posts: 1
Default forgotten variations of loop


Hi i have always used the following loop statement in my code.
Do
''stuff
'' have a range setup
set rng = rng.offset(1,0)

Loop until rng = (some value such as 2004)

I know that somehow you can loop until you find a certain value e.g
2003, perform the loop once more and then exit loop. This would avoid
using the 'until' part and would benefit me more as not all of my
sheets contain cells with 2004 in them.

Just to give you a bit further background the loop copies and pastes
raw data in certain columns until it reaches 2004 which is forecasted,
however not all sheets/ranges need to contain forecasted data and thus
have a column entitled 2004!!


--
cereldine
------------------------------------------------------------------------
cereldine's Profile: http://www.excelforum.com/member.php...o&userid=32069
View this thread: http://www.excelforum.com/showthread...hreadid=543676