Solved

Date help, within 60 days of Aug 6

Posted on 2014-09-25
9
136 Views
Last Modified: 2014-09-25
Experts,

I might be able to figure out how to do this but I dont want to run the risk of relying on myself.  :)
I need to modify the below to show 60 days after Aug 6

=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)

the above shows the 15 of either Jan or July

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
  • 4
  • 4
9 Comments
 
LVL 18

Expert Comment

by:Jerry Miller
ID: 40344249
You may be over thinking this or I don't fully understand what you are trying to accomplish. If you only need the date that is 60 days from 8-6, put that date in a cell (A5 in my example) and use =A5+60 in B5 or where ever you wan to display the value 10-5-2014.

Days is the default date value in adding / subtracting dates. If you want any other value it is a little more complex, but here is a good tutorial.


http://office.microsoft.com/en-us/excel-help/add-or-subtract-dates-HP010342155.aspx
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40344270
First, 60 days after August 6 is ALWAYS October 5.  Once you know that it's easier to construct the formula.

Going back to your previous questions regarding cutoff, the presumption here is that you want to return a fixed cutoff date (i.e., 60 days after Aug 6, or Oct 5) if the current date is less than or equal to August 5.

However, unlike your previous questions, you're not providing a second cutoff date.  Presumably, this may be six months away (February 6), but that's not clear.   What, for example, should the result be if today's date was November 1?

-Glenn
0
 

Author Comment

by:pdvsa
ID: 40344734
Hello once again, Glenn, for this one there is not a second date.  It is just simply 60 days after Aug 6.  

Jerry:  you have been a little out of the loop in my previous questions.  I was sure that either Glenn or Philip would be responding.  I think its a little more difficult but maybe you are right I am thinking too much into it.  I can say that I can not reference a cell within the formula.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:pdvsa
ID: 40344738
quite possibly it is this?
DATE(YEAR(NOW()),8,6)+60
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40344784
According to your formula, November 1 - or ANY date in 2014 would return October 5.  Is that correct?

Or, should dates after October 5 yield October 5 of the following year?
0
 

Author Comment

by:pdvsa
ID: 40344843
Actually if it is past Oct 5 then it should be the following year.  I did not catch that.
0
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 500 total points
ID: 40344902
Okay, then you could modify your formula like so:
=DATE(YEAR(NOW())+IF(NOW()>DATE(YEAR(NOW(),10,5),1,0),8,6)+60

or
=IF(NOW()>DATE(YEAR(NOW()),10,5),DATE(YEAR(NOW())+1,10,5),DATE(YEAR(NOW()),10,5)
0
 

Author Closing Comment

by:pdvsa
ID: 40344952
Perfect.  I used the second one.  The first one gave me an error of too many arguments and highlighted the 10.
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40344982
I posted that last answer via mobile... :-/  Here's the correct formula:
=DATE(YEAR(NOW()+IF(NOW()>DATE(YEAR(NOW()),10,5),1,0)),8,6)+60

-Glenn
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

623 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