Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Date help, 60 days after of Jan and July

Posted on 2014-09-25
5
Medium Priority
?
201 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
[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
  • Learn & ask questions
5 Comments
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 2000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
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.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

715 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