Posted to microsoft.public.excel.programming
|
|
Loop through Row Range, Excel 2000, 2003
Thank you Dave for your help!
jfcby
Dave Peterson wrote:
I think Gary's Student was actually concatenating all those cells into a single
string and then comparing that concatenated string to "".
If the OP wanted to use AND, then it would look more like:
if cells(i,"D").value = "" _
and cells(i,"E").value = "" _
and cells(i, "B").value = "" then
....
Don Guillett wrote:
Fully tested ?
For i = 8 To 15
If Cells(i, "D").Value & Cells(i, "E").Value & Cells(i, "B").Value = ""
If Cells(i, "D").Value AND Cells(i, "E").Value AND & Cells(i,
"B").Value = ""
--
Don Guillett
SalesAid Software
"Gary''s Student" wrote in message
...
sub demo()
For i = 8 To 15
If Cells(i, "D").Value & Cells(i, "E").Value & Cells(i, "B").Value = ""
Then
Exit Sub
End If
Next
End Sub
--
Gary's Student
"jfcby" wrote:
Hello,
My BEGIN row range is "B8,D8:E8" END row range is "B15,D15:E15". I need
to check each row value and if the row is all blank I want to exit sub,
if the row range has all data then I want go to continue macro, if a
row has a blank cell I want to continue macro.
This is a example code I've got so far but I do not know how to get it
to loop the the rows:
If Range("B8").Value & Range("D8").Value & Range("E8").Value = "" Then
Exit Sub
Thank you for your help in advance,
jfcby
--
Dave Peterson
|