Solved

Date help - on each Jan and July 15 of each year

Posted on 2014-11-19
11
72 Views
Last Modified: 2014-11-19
Experts, I need to modify the below for a date that lands on Jan 15 and July 15 of each year.  The below is for 60 days after and I need to make the modification to my new criteria.  I thought I could simply delete the +60 but that does not solve it.  

I also need to use the PREVIOUS workday and not the next workday.  
thank you.

=WORKDAY(DATE(YEAR(H207),CHOOSE(MONTH(H207),IF(DAY(H207)>15,7,1),7,7,7,7,7,IF(DAY(H207)>15,13,7),13,13,13,13,13),15+60)-1,1,Holidays_US_Jap)
0
Comment
Question by:pdvsa
  • 5
  • 2
  • 2
  • +1
11 Comments
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40452736
Is this correct? You want Jan 15 and July 15, but the previous workday?

If so:

=WORKDAY(DATE(YEAR(H207),CHOOSE(MONTH(H207),IF(DAY(H207)>15,7,1),7,7,7,7,7,IF(DAY(H207)>15,13,7),13,13,13,13,13),15),-1,Holidays_US_Jap)
0
 

Author Comment

by:pdvsa
ID: 40452810
Hi Philip,

Maybe it makes a difference if I am dragging the formula down?  
I dont seem to get what I am after as the same date appears in each cell.  

Please see attached.

thank you
EE-Each-Jan-July15.xlsx
0
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40452863
What are you after?
0
 

Author Comment

by:pdvsa
ID: 40452882
the display should be either Jan 15 or July 15 of that year taking into account the holiday tab and workday (not weekends).  You can see from the excel attached it is not.
0
 
LVL 21

Accepted Solution

by:
Ejgil Hedegaard earned 500 total points
ID: 40453104
Insert in A2 and copy down this formula, to get the last workday before the next Jan 15 or July 15.
=WORKDAY(DATE(YEAR(A1),MONTH(A1)+6,15),-1,Holidays_US_Jap)
0
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.

 
LVL 50

Expert Comment

by:barry houdini
ID: 40453110
Hello Ejgil, I was just posting something almost identical! I think the 15 should be a 16, though, so that you will actually get the 15th when it isn't a holiday or weekend

regards, barry
0
 

Author Comment

by:pdvsa
ID: 40453167
Barry, I tried it Ejgil and your way and I confirm that the 15 should be a 16.  Please see attached
EE-Each-Jan-July15-Barry.xlsx
0
 

Author Comment

by:pdvsa
ID: 40453170
i will wait any comments before awarding points.
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 40453197
Points to Ejgil, please - it was his answer with only a small tweak from me

regards, barry
0
 

Author Closing Comment

by:pdvsa
ID: 40453246
amirable.

thank you both..
0
 
LVL 21

Expert Comment

by:Ejgil Hedegaard
ID: 40453550
I used 15 because the question said
need to use the PREVIOUS workday
,
for a date that lands on Jan 15 and July 15 of each year
Perhaps I misunderstood :)
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

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…
Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

867 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

15 Experts available now in Live!

Get 1:1 Help Now