date formula

J

Juco

In cell M26 I have the fllowing formula...
=DATE(E7,D7,C7-42)
If cells E7,D7,C7 are blank ie no date in them
How can I get a default date of 1 jan 2005 to appear

thanks
 
N

Niek Otten

=IF(AND(E7=0,D7=0,C7=0),DATE(2005,1,1),DATE(E7,D7,C7-42))

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel
 
J

Juco

Thanks Niek,

That works great.


Niek Otten said:
=IF(AND(E7=0,D7=0,C7=0),DATE(2005,1,1),DATE(E7,D7,C7-42))

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel
 

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