# If cell meets date requirement enter 1, if not enter 0, if blank don't enter anything.

1. ## If cell meets date requirement enter 1, if not enter 0, if blank don't enter anything.

I am trying to use a IF statement to return one of 3 results but can't figure it out. Thanks for any help.

If the cell date is prior to the set date, enter the number 1.
If the cell date is after the set date, enter the number 0.
If the cell is blank, do nothing.

Example:
Set date = 11/1/2017, located in cell A4.
Cell to be evaluated is located in B5.
Formula entered into cell C5.
If B5 is blank, how do I get C5 to also be blank? I've tried:
1) IF(B5<A4,1,0), IF(B5="","",??)

2. ## Re: If cell meets date requirement enter 1, if not enter 0, if blank don't enter anything.

=IF(c4="","",if(CONDITION,IF TRUE,IF FALSE)

Thanks

3. ## Re: If cell meets date requirement enter 1, if not enter 0, if blank don't enter anything.

I believe this will work. Let me know!

=IF(\$A\$4<B5,1, IF(\$A\$4>B5,0,""))

Works except for the darn thing won't do anything to the blank cell, I'm sure someone who is more skilled can spot my error.

4. ## Re: If cell meets date requirement enter 1, if not enter 0, if blank don't enter anything.

Seems Luke was correct!

=IF(B5="","",IF(\$A\$4>B5,1,0))

5. ## Re: If cell meets date requirement enter 1, if not enter 0, if blank don't enter anything.

Thanks for the reply. I tired yours and if the cell is blank, the result returned is 1. If the cell was blank, I wanted nothing returned (""). I tried yours also with an OR statement in place fo the AND statement and still got a result of 1. The formula Luke Gilfoyle suggested worked. Thank you though for your suggestion.

6. ## Re: If cell meets date requirement enter 1, if not enter 0, if blank don't enter anything.

Yep! I tried them with and as well as or, I was writing it using the wrong references, but glad it works now!

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1