Solved

Date help, 60 days after of Jan and July

Posted on 2014-09-25
5
182 Views
Last Modified: 2014-09-25
Experts,

I need a formula for 60 days after Jan 15 and July 15.  

ie:  today is 9/25/2014 so the return would show 60 days after July 15 which is Sept 15.  
Once past July 15 then the return would show 60 days after Jan15 which is Mar15.

this formula shows either Jan 15 or July 15.  I think the solution is to modify the below formula to add 60 days.
but I dont understand where to add the days.  

=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),15)
thank you
0
Comment
Question by:pdvsa
5 Comments
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 500 total points
ID: 40343975
Well, first of all, 60 days AFTER January 15 can be either
March 16 - if a non-leap year
March 15 - if a leap year.

And 60 days AFTER July 15 is ALWAYS September 13.

To modify your formula to get these dates:
=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),75)

Just added 60 to the final day amount (from 15 to 75)

-Glenn
0
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40343984
You may want to understand my code:

=DATE(YEAR(NOW())

Open in new window


This contains the year for the answer:

,CHOOSE(MONTH(NOW()),

Open in new window


This is going to be the month of the answer, and you are telling to computer that it is going to be based on the current month:

IF(DAY(NOW())>15,7,1),7,7,7,7,7,IF(DAY(NOW())>15,13,7),13,13,13,13,13)

Open in new window


These are the month of the answer, one value of each month we are currently in. A "13" means January of next year.

,75)

Open in new window


This is the month you are using. This is therefore the 15th day plus another 60 days.

Hope this helps you understand the code.
0
 

Author Closing Comment

by:pdvsa
ID: 40344017
thank you.  Its still a lot to understand however I do understand the edit from 15 to 75.
0
 
LVL 33

Expert Comment

by:Rob Henson
ID: 40344024
With addition to my previous suggestion using EOMONTH:

=EOMONTH(TODAY(),IF(AND(DAY(TODAY())<16,OR(MONTH(TODAY())=1,MONTH(TODAY())=7)),-1,IF(MONTH(TODAY())<7,6,12)-MONTH(TODAY())))+15+60

The +15+60 could obviously be changed to +75

Thanks
Rob H
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40344247
On the other hand, if you indeed wanted to return these values always (i.e., two MONTHS) after cutoff:
July 15 ---> September 15
January 15 ---> March 15

then the formula would be more like this:
=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)

This adds 2 to the chosen month and leaves the day value (15) constant.

-Glenn
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question