![]() |
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 |
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 |
All times are GMT +1. The time now is 02:11 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com