Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Simple do until question


Do Until sheet1.range("a1").value = ""

The above code stops when there is nothing in a cell,

how does the code need to look when it needs to stop at the first cell
that it picks up text.

Thanks
Theuns


--
T.c.Goosen1977
------------------------------------------------------------------------
T.c.Goosen1977's Profile: http://www.excelforum.com/member.php...o&userid=35895
View this thread: http://www.excelforum.com/showthread...hreadid=562421

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default Simple do until question

It is working correctly...(as you wrote it). If cell "A1" is empty nothing
will happen. But by your comment "when it needs to stop at the first cell
that..." I presume you are trying to move through a range of cells like this
(e.g. down column "A")

Dim Cell As Range

For Each Cell In Sheet1.Range("A:A")
If Cell.Value < "" Then Exit For
Next Cell

MsgBox Cell.Value & vbCrLf & Cell.Address(False, False)

"T.c.Goosen1977" wrote:


Do Until sheet1.range("a1").value = ""

The above code stops when there is nothing in a cell,

how does the code need to look when it needs to stop at the first cell
that it picks up text.

Thanks
Theuns


--
T.c.Goosen1977
------------------------------------------------------------------------
T.c.Goosen1977's Profile: http://www.excelforum.com/member.php...o&userid=35895
View this thread: http://www.excelforum.com/showthread...hreadid=562421


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
IF formula-simple question; simple operator Rich D Excel Discussion (Misc queries) 4 December 6th 07 03:36 PM
simple vba question Jonathan Cooper Excel Discussion (Misc queries) 4 February 10th 06 07:03 PM
Simple Question cmk18[_12_] Excel Programming 1 August 19th 05 03:29 PM
Simple Simple Excel usage question BookerW Excel Discussion (Misc queries) 1 June 23rd 05 10:06 PM
simple question, hopefully a simple answer! Matt B Excel Programming 5 January 13th 04 08:43 PM


All times are GMT +1. The time now is 05:44 PM.

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"