If Statement

W

Ward

Hi,

Please can you help,

I have a date in column A and a date in column B. In column C, I would like
the work 'Ok' to appear if the difference between the two dates is +/- 2
weeks. If the difference between the dates is more than +/-weeks then the
words 'not ok' to appear. Example:

A B C
01/01/04 01/01/04 OK
01/01/04 15/01/04 Not OK
16/03/04 15/03/04 OK
16/03/04 01/03/04 Not Ok

Thanks,
Ward
 
M

Mike H

Hi,

I don't understand why
01/01/04 15/01/04 Not OK

evaluates as "Not OK" in you example but try this


=IF(ABS(B1-A1)<=14,"OK","Not OK")

Mike
 
Top