Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Go To Next Cell If is empty 1

Status
Not open for further replies.

DIVINEDAR0956

IS-IT--Management
Aug 15, 2002
95
US
I need a procedure that will check and see if a cell has text in it and if so go down to the next cell. I am really having trouble using the For...Loop or the For...Next issue. Please help. [cry]

 
There are other ways, but you did ask for a loop method.
'------------------------------------------------------
Sub test()
Dim ToRow As Long
ToRow = 1
'- loop
While ActiveSheet.Cells(ToRow, 1).Value <> &quot;&quot;
'put your code here to do something
ToRow = ToRow + 1
Wend
'- you are now at the blank cell
MsgBox (ActiveSheet.Cells(ToRow, 1).Address)
End Sub
'-----------------------------------------------
Regards
BrianB
================================
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top