Why won't my formula work?


Posted by Kim on January 16, 2002 6:56 PM

I am creating an attendance spreadsheet that requires a logistiacl formula. I want it to say "If(date,then 1,if not date, then 0)". When I enter the formula it calculates 1 no matter what the date is. What am I doing wrong?

Posted by . on January 16, 2002 7:02 PM

Post the whole formula please (nt)

Posted by Jacob on January 16, 2002 9:06 PM

Hi

You have to say if date=somthing then this if true else this if false.

For example

=IF(TODAY()>DATE(2002,1,17),1,0)

Then if the result of the If is true it will display 1 and 0 for false.

HTH

Jacob



Posted by Mark W. on January 17, 2002 7:41 AM

If you want to compare...

...an entered date (say, in cell A1) to a specific
date (say, 1/16/2002) you could use...

=IF("1/16/2002"-A1,0,1)

If I'm interpeting your posting correctly, you're
attempting something like... =IF(A1,1,0) where
A1 contains a date value. Keep in mind that
all dates are represented internally as an integer
and the IF worksheet function will treat all
postive and negative numeric values as TRUE; hence,
=IF(A1,1,0) will always return 1.