Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF formula-simple question; simple operator | Excel Discussion (Misc queries) | |||
simple vba question | Excel Discussion (Misc queries) | |||
Simple Question | Excel Programming | |||
Simple Simple Excel usage question | Excel Discussion (Misc queries) | |||
simple question, hopefully a simple answer! | Excel Programming |