# Prevent returning value on a blank cell (=IF, True/False)

• I am working on a spread sheet that takes the day you left (away from home for work) and the day you returned (back to home) and produces the # of days you were gone. The next cell then adds those days together to give you your next date that person is able to leave on the next assignment (i.e. 1 for 1). If I leave 10 March and return 20 March I am capable of leaving again on April 1st. At the top on the sheet I am factoring how many employees are capable of leaving on assignment vs incapable based off of if the date is in the future or passed. This returns a true false value. But it still counts blank cells as true or false giving a wrong count at the top of the spread sheet.

I am using the below formula for the factoring cell

=IF(I25>NOW(),"good","not good")

[TABLE="class: outer_border, width: 355, align: center"]

[tr]

[TD="width: 107"]June 12, 2014[/TD]
[TD="width: 174"]July 5, 2014[/TD]
[TD="width: 72"]23[/TD]
[TD="width: 122"]July 28, 2014[/TD]

[/tr]

[/TABLE]

Now if the cell is blank I want a return of anything other than "good" or "not good" to keep my roll up count at the top accurate but this isn't happening. Even if it is blank it produces a "good". So if I have a section that doesn't have names to it or dates yet it still produces an answer of True/False. Is =IF not the way to go? Should I use LOOKUP? I'm losing my mind figuring this out.

At the top of the Spread sheet to count I am using the formula below.

=COUNTIF(J15:J190,"good")

Which feeds off of the 1st formula. But like I mentioned before....if it's blank it still returns the True/False answer. Any ideas?

• Re: Prevent returning value on a blank cell (=IF, True/False)

=IF(I25>NOW(),"good","not good")

Try using

=IF(I25="","",IF(I25>NOW(),"good","not good"))

Hopefully I hae understood how you have set up your formula in relation to your data!

• Re: Prevent returning value on a blank cell (=IF, True/False)

Thanks for the help Gizzmo,

I miss-typed. It isn't a blank cell, it is a return of 0-Jan-00 because it is calculating a 2 cell date range into the number of days gone. Then adding those days to the return date to give the employee maximum time home with family before going back on the road.

I tried: =IF(I26="0-Jan-00","",IF(I26>NOW(),"Good","Not Good"))
But it isn't working. If I remove the formula returning the date and make it blank it works.

• Re: Prevent returning value on a blank cell (=IF, True/False)

Try =IF(I26=0,"",IF(I26>NOW(),"Good","Not Good"))

## Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!