Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - IF Formula with dates 1

Status
Not open for further replies.

BxWill

MIS
Mar 30, 2009
367
US
Have the following if formula in Excel 2007 that is not displaying the desired result:

=IF(TRIM(Y7)<TODAY(),"Closed","Open")


10/1/2008 is in cell Y7

What modifications to the if formula is needed to display the desired result?

Thanks in advance.

 


hi,

You only need to TRIM TEXT data.

A REAL DATE is not TEXT. It is a NUMBER. If column Y contains REAL DATES then
[tt]
=IF(Y7<TODAY(),"Closed","Open")
[/tt]
and it it's TIME that you're concerned about, then
[tt]
=IF(INT(Y7)<TODAY(),"Closed","Open")
[/tt]
But it should make no difference in this specific instance.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Read Skip's advice above. Then, check: What's the short date in your Regional Settings? May be that's your problem.

Canadian eh! Check out the new social forum Tek-Tips in Canada.
With the state of the world today, monkeys should get grossly insulted when humans claim to be their decendents
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top