isblank

E

Eileen

I am trying to enter a formula to calculate a date 30 days later in cell b1
only if cell a1 has a date. If cell a1 does not have a date then leave b1
blank. I am getting a return date of 30-Jan-00 when cell a1 is blank. I don't
understand why 30-Jan-00 comes up. This is the formula that I am using:

=IF(ISBLANK(A1),"",IF(COUNT(A1+30),A1+30,""))

Thank you in advance for your help.
Eileen
 
R

ryguy7272

Your function seems to work for me (the logic part). Right-click on the cell
that reads '30-Jan-00' then select an appropriate format...perhaps General,
Date, or Custom. Try different scenarios until you get what you want.


Regards,
Ryan---
 
T

T. Valko

The only way that your formula could return 30-Jan-00 is if A1 contains a
number >=0, <1 or the logical value FALSE.

If A1 is empty or contains a formula blank ("") the result will be "".

Maybe A1 contains 0 but you have 0 display turned off: Tools>Options>View
tab>Zero display.

Try this (assuming that only true Excel dates are to be entered in A1):

=IF(AND(COUNT(A1),A1>0),A1+30,"")
 

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