Solved

Date help, 60 days after of Jan and July

Posted on 2014-09-25
5
175 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 32

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
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…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

863 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now