Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
embedding "ISERROR" function into an "IF" statement | Excel Worksheet Functions | |||
Call a sub statement in "Personal Macro Workbook" from "ThisWorkbo | Excel Programming | |||
vba: How do I write a "For Each Statement" nested in a "With Statement"? | Excel Programming | |||
vba: How do I write a "For Each Statement" nested in a "With Statement"? | Excel Programming |