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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top