If cell is empty do nothing if cell date is more than this date and less than this date then enter 900 otherwise 999

This formula will return: - An empty cell if A1 is blank

- 900 for any 2015 date in A1

- 999 for anynot2015 date in A1=IF(A1="","",IF(AND(A1>DATEVALUE("12/31/2014"),A1<DATEVALUE("1/1/2016")),900,999))

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

That's great worked just as I wanted it to. I did put the dates into 2 different cells

then entered the cell numbers instead of the date but that didn't work. Is that possible?

If you are using a cell reference, you don't need the DATEVALUE function. =IF(A1="","",IF(AND(A1>$I$1,A1<$J$1),900,999))

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

message edited by DerbyDad03

Much obliged DerbyDad03 Worked great. I thought that it would be easier to alter

the cell values than altering the formula when needed.

Ask Your Question

Weekly Poll

Do older people you know use the Internet?

Discuss in The Lounge

Poll History