ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   isblank (https://www.excelbanter.com/excel-worksheet-functions/182815-isblank.html)

Eileen

isblank
 
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


ryguy7272

isblank
 
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---

--
RyGuy


"Eileen" wrote:

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


Bob

isblank
 
=IF(ISBLANK(a1),"",DATE(YEAR(a1),MONTH(a1), DAY(a1)+30))

"Eileen" wrote:

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


David Biddulph[_2_]

isblank
 
=IF(A1="","",A1+30)
--
David Biddulph

"Eileen" wrote in message
...
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




T. Valko

isblank
 
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: ToolsOptionsView
tabZero display.

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

=IF(AND(COUNT(A1),A10),A1+30,"")


--
Biff
Microsoft Excel MVP


"Eileen" wrote in message
...
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





All times are GMT +1. The time now is 12:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com