Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default for x 2 to 100

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
--
Thank you...
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default for x 2 to 100

Something like this perhaps: HTH Otto
Sub Test()
Dim x As Long
For x = 2 To 100
If Not IsEmpty(Range("H" & x)) Then
'perform what I want
End If
Next x
End Sub

"EXCELMACROS" wrote in message
...
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
--
Thank you...



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default for x 2 to 100

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

--
Rick (MVP - Excel)


"EXCELMACROS" wrote in message
...
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
--
Thank you...


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"