View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 1,726
Default Simple "If" statement ?

If Range("F4").Value < ""Then
'Code if cell "F4" has a date in it
ElseIf Range("F5").Value < ""Then
'Code if cell "F5" has a date in it
END IF



--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"BluzDude" wrote in message
...
Can someone tell me how to write an "IF" statement that looks at a cell
(F4)
and if that cell has a date in it, it executes the code following, if the
cell is empty it goes to the next "IF" statement and repeats the same
procedure on the next row (F5), etc., etc.?

I've tried this and it doesn't work:

IF NOT Range("F4") IS NOTHING THEN
'Code if cell "F4" has a date in it
ELSEIF NOT Range("F5") IS NOTHING THEN
'Code if cell "F5" has a date in it
END IF