Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Show prior year based on date in other cell | Excel Worksheet Functions | |||
How to show date in H2 based on date in I2 minus set number of day | Excel Discussion (Misc queries) | |||
Show a date based on today | Excel Worksheet Functions | |||
Show a date based on today | Excel Worksheet Functions | |||
Show a date based on today | Excel Worksheet Functions |