for x 2 to 100

  • Thread starter Thread starter EXCELMACROS
  • Start date Start date
E

EXCELMACROS

hi, I basically want to add an if statment to move to the next X if a cell is
empty else conitun, please help.

For x 2 to 100
If isempty(range("H" & X)) then
***go to next x
else
perform what I want
end if
next x
 
Try it like this...

For X = 2 To 100
If Range("H" & X).Value = "" Then
'perform what I want
End If
Next

or this (more efficient method)...

For X = 2 To 100
If Len(Range("H" & X).Value) Then
'perform what I want
End If
Next
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top