#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default loop

I am fairly new user of Visual Basic. I am trying to find a way to loop using a value in a range name to end loop, but have been unsuccessful so far. The range name will change when we process a new day, but would not change within the loop. I have tried a Do While Range("work") = Range("day") & =day & = "day" . The answer is proably simple but it is beyond my knowledge.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 340
Default loop

Sandy, if could you give us a simple description of what you are trying to
do I am certain that many of us can leap in and help. Unfortunately, the
meaning/purpose of Do While Range("work") = Range("day") & =day & = "day"
escapes me, so I am left being unable to help.

Some things to look at doing is checking a value in a cell and if it is out
of range then to exit:

For each cell in Range("work")
if cell.value somevalue then exit for
'do some work
Next

Again, when we understand more, we can help more.

Bob Flanagan
Macro Systems
Delaware, U.S. 302-234-9857
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel

"sandyc" wrote in message
...
I am fairly new user of Visual Basic. I am trying to find a way to loop

using a value in a range name to end loop, but have been unsuccessful so
far. The range name will change when we process a new day, but would not
change within the loop. I have tried a Do While Range("work") =
Range("day") & =day & = "day" . The answer is proably simple but it is
beyond my knowledge.


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
Find loop doesn't loop JSnow Excel Discussion (Misc queries) 2 June 24th 09 08:28 PM
loop Wanna Learn Excel Discussion (Misc queries) 14 September 1st 06 12:36 AM
Help with a loop Peter Excel Programming 7 May 25th 04 09:34 PM
Worksheet_Change - loop within a loop bgm Excel Programming 1 January 19th 04 01:27 PM
HELP!!!! Can't stop a loop (NOT an infinite loop) TBA[_2_] Excel Programming 3 December 14th 03 03:33 PM


All times are GMT +1. The time now is 08:24 PM.

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

About Us

"It's about Microsoft Excel"