Formula help needed

J

Jan

Excel 97.

Column/Row B2 = text value
Column/Row O2 = Date value

I need a formula to evaluate as follows:

If B2 & O2 contain no value return "", if B2 contains a value & O2 is null
return 0 (zero), otherwise calculate today()-O2.

I have been trying many variations of formulas to return the above results
without any success. Can anyone advise on the correct formula to enter?

TIA
Jan
 
B

Biff

Hi!
O2 is null

Null means different things to different people!

Does null mean an empty cell (no formulas, nothing), a number 0, or a blank
cell (formula blank: "") ?

Try this:

=IF(COUNTA(B2,O2)=0,"",IF(AND(B2<>"",O2=""),0,TODAY()-O2))

Biff
 

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