Solved

# Date help, within 60 days of Aug 6 and Feb 6

Posted on 2014-10-17
149 Views
experts, how can I modify the below to show a date that is 60 days after Aug 6 or Feb 6?  The below shows a date that is 60 days after Jan15 and July 15

=DATE(YEAR(NOW()),CHOOSE(MONTH(NOW()),IF(DAY(NOW())>15,7,1),7,7,7,7,7,IF(DAY(NOW())>15,13,7),13,13,13,13,13)+2,15)

thank you
0
Question by:pdvsa
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 2

LVL 70

Expert Comment

ID: 40387079
``````=DATE(YEAR(NOW()),CHOOSE(8, MONTH(NOW()),IF(DAY(NOW())>6,8,2),8,8,8,8,8,IF(DAY(NOW())>6,14,8),14,14,14,14)+2,6)
``````
However, if you use such a formula, you should try to understand what it does, and why.
0

LVL 50

Accepted Solution

barry houdini earned 500 total points
ID: 40387278
Qlemo

I don't think your formula is working as intended, you have 8 as the first argument of CHOOSE function so that defeats the purpose of CHOOSE - I'd expect the first argument to be MONTH(NOW()) as per the original.

pdvsa,

I think it's more accurate to say that your original formula will add 2 months (not 60 days) to today's date and then return the next 15th March or 15th September date (whichever comes first). This formula will do that using a different approach

=LOOKUP(EDATE(TODAY(),8)-1,DATE(YEAR(TODAY()),{3,9,15},15))

If you want to do the same but show 6th April or 6th October then this formula will do that:

=LOOKUP(EDATE(TODAY(),8)-1,DATE(YEAR(TODAY()),{4,10,16},6))

The only difference is the numbers at the end based on the cut-off dates you want

regards, barry
0

Author Closing Comment

ID: 40387328
Thank you.  I used the second formula.  Works perfectly.
0

LVL 50

Expert Comment

ID: 40387350
Actually, there's an even simpler way, if you want.

=COUPNCD(EDATE(TODAY(),2),DATE(9999,10,6),2)

That will give the same results as the second formula above

regards, barry
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …