Solved

Date help, within 60 days of Aug 6

Posted on 2014-09-25
9
129 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
  • 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
 

Author Comment

by:pdvsa
ID: 40344738
quite possibly it is this?
DATE(YEAR(NOW()),8,6)+60
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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,…
Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

762 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