ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Need help with a project sheet, need date to show/not show based o (https://www.excelbanter.com/excel-discussion-misc-queries/250495-need-help-project-sheet-need-date-show-not-show-based-o.html)

Max

Need help with a project sheet, need date to show/not show based o
 
Hello,

I have the following formula in cell S2
=IF(B2="","",DATE(YEAR(B2),MONTH(B2),DAY(B2)+31))
This takes a date in cell B2 and adds 31 days to it and displays it.

What I need to do is to NOT have cell S2 show any date if anything is in
cell D2.

I'm not very adept at Vis Basic if that what it will take to do it.

Thanks
Max

Mike H

Need help with a project sheet, need date to show/not show based o
 
Hi,

No need for code

=IF(OR(B2="",D2<""),"",DATE(YEAR(B2),MONTH(B2),DA Y(B2)+31))

Mike

"Max" wrote:

Hello,

I have the following formula in cell S2
=IF(B2="","",DATE(YEAR(B2),MONTH(B2),DAY(B2)+31))
This takes a date in cell B2 and adds 31 days to it and displays it.

What I need to do is to NOT have cell S2 show any date if anything is in
cell D2.

I'm not very adept at Vis Basic if that what it will take to do it.

Thanks
Max


מיכאל (מיקי) אבידן

Need help with a project sheet, need date to show/not show based o
 
In order to add ONE full month to a date [if this is your intension] I would
suggest using: =EDATE(B2,1)
Check your formula against the above
PS: You may need to install the Analysis Toolpak if you are using Excel ver.
prior to 2007.
Micky


"Max" wrote:

Hello,

I have the following formula in cell S2
=IF(B2="","",DATE(YEAR(B2),MONTH(B2),DAY(B2)+31))
This takes a date in cell B2 and adds 31 days to it and displays it.

What I need to do is to NOT have cell S2 show any date if anything is in
cell D2.

I'm not very adept at Vis Basic if that what it will take to do it.

Thanks
Max


Max

Need help with a project sheet, need date to show/not show bas
 
Mike,

Initially it worked the opposite of what I wanted it to do, but after
changing the < to a = it seems to work fine.

Thanks for your help!

"Mike H" wrote:

Hi,

No need for code

=IF(OR(B2="",D2<""),"",DATE(YEAR(B2),MONTH(B2),DA Y(B2)+31))

Mike

"Max" wrote:

Hello,

I have the following formula in cell S2
=IF(B2="","",DATE(YEAR(B2),MONTH(B2),DAY(B2)+31))
This takes a date in cell B2 and adds 31 days to it and displays it.

What I need to do is to NOT have cell S2 show any date if anything is in
cell D2.

I'm not very adept at Vis Basic if that what it will take to do it.

Thanks
Max


Fred Smith[_4_]

Need help with a project sheet, need date to show/not show bas
 
You can also shorten your formula to:
=IF(OR(B2="",D2=""),"",B2+31)

Regards,
Fred.


"Max" wrote in message
...
Mike,

Initially it worked the opposite of what I wanted it to do, but after
changing the < to a = it seems to work fine.

Thanks for your help!

"Mike H" wrote:

Hi,

No need for code

=IF(OR(B2="",D2<""),"",DATE(YEAR(B2),MONTH(B2),DA Y(B2)+31))

Mike

"Max" wrote:

Hello,

I have the following formula in cell S2
=IF(B2="","",DATE(YEAR(B2),MONTH(B2),DAY(B2)+31))
This takes a date in cell B2 and adds 31 days to it and displays it.

What I need to do is to NOT have cell S2 show any date if anything is
in
cell D2.

I'm not very adept at Vis Basic if that what it will take to do it.

Thanks
Max




All times are GMT +1. The time now is 11:57 PM.

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