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

x
?
Solved

lapsed months considering start, and end dates coinciding with holidays

Posted on 2016-08-04
13
Medium Priority
?
53 Views
Last Modified: 2016-08-24
Dear experts,

I need an excel formulae which will calculate the # of months between two dates considering the holidays and weekends coinciding the end date of the date range.
Col. I in sheet ‘examples’ has the logic for the calculations to be performed by the excel formula.
Col. E is the internal calculation performed by the excel formula.
Col. F has the desired results expected from the excel formula.

Kindly help.

Thank you
lapsed-months-considering-start--an.xlsx
0
Comment
Question by:Excellearner
[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
  • 4
  • 3
  • +1
13 Comments
 
LVL 33

Expert Comment

by:Rob Henson
ID: 41742255
How is this different to your previous question:

https://www.experts-exchange.com/questions/28960993/of-months-between-two-dates.html

EE Moderators do not allow duplicate questions.

Thanks
Rob
0
 

Author Comment

by:Excellearner
ID: 41742279
Rob,

thank you.

In my previous question I was not clear with my thought process and hence I had to make increments/adjustments to my original question.

In the end I do think I was helpful in getting the excel formulae.

I am happy to grade experts based on the insights provided but I do not which formula addresses my requirements.

In this question I am clear with my objective and I hope I have explained the purpose clearly.

I am happy to delete this question provided the experts can now provide their final formula which will address my question.

I am sorry if I come across in my above writing as being harsh.

Thank you
0
 
LVL 18

Assisted Solution

by:xtermie
xtermie earned 500 total points (awarded by participants)
ID: 41742342
=NETWORKDAYS(B7;C7;Holidays!$A$2:$A$5) will yield days

For a month calculation
=ROUNDUP(NETWORKDAYS(B7;C7;Holidays!$A$2:$A$5)/22;0)
given that internationally 22 working days per week, on average
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 53

Accepted Solution

by:
Rgonzo1971 earned 1000 total points (awarded by participants)
ID: 41742368
Hi,

I repeat my proposal
=DATEDIF(B4,C4-1,"m")+1

Open in new window

Regards
lapsed-months-considering-startV1.xlsx
0
 
LVL 33

Expert Comment

by:Rob Henson
ID: 41742386
I repeat my question - how does a single holiday date impact on the number of months when you want whole or part months to be included?

To give an analogy, imagine you have 5 tankers of oil, if you remove a barrel full from one tanker you still have 5 tankers.

Unless a whole month is assigned as holiday, single days or groups of days will have no impact.

To that regard, I agree with the DATEDIF formula proposed above.

Thanks
Rob H
0
 

Author Comment

by:Excellearner
ID: 41742473
xtermie,

Your below formula:
For a month calculation
=ROUNDUP(NETWORKDAYS(B7;C7;Holidays!$A$2:$A$5)/22;0)


When I put this formulae in cell H4 in sheet examples, the formula did not work and cursor was highlighting on B7
0
 

Author Comment

by:Excellearner
ID: 41742476
Rgonzo1971,

It has given me the desired result.

I need time till EOD today to just understand where I am confused and confusing you all.

thank you
0
 
LVL 33

Assisted Solution

by:Rob Henson
Rob Henson earned 500 total points (awarded by participants)
ID: 41742645
@excellearner - I suspect that the formula from xtermie should go in H7 as it is referring to dates in B7 and C7.

Also the formula has the semi-colon as the argument separator, change those to commas:

=ROUNDUP(NETWORKDAYS(B7,C7,Holidays!$A$2:$A$5)/22,0)

Thanks
Rob
1
 
LVL 18

Expert Comment

by:xtermie
ID: 41742892
Rob is right, try that and it will work...Thanks Rob
due to my regional settings there are ; instead of , in Excel functions
0
 

Author Comment

by:Excellearner
ID: 41743806
Dear xtermie

1      01-May-16      01-Jun-16
The results for the above sample is 2 months

3      02-Jul-16       02-Aug-16
The results for the above sample is 1 month

I do not think this is consistent (or visually correct)

Kindly help.

Thank you
0
 
LVL 18

Expert Comment

by:xtermie
ID: 41744004
Yes you are right, see the attached example, with the formula.
However, as Holidays are extracted (which includes weekends and the holidays you specified) you can see in the example that NETWORKING days are:

01-May-16      01-Jun-16                        23
02-Jul-16         02-Aug-16                       22

So using 22 as the set cutpoint for working days that comprise a month will yield 2 months in the first case and 1 month in the second month

You need to decide what your "MONTH" will be.
For example, what will happen if you have lets say 5 holidays in a month, like in December or no holidays?  If you just want to use the physical difference of the dates as the MONTHS for your calculation but use the NETWORKING days for calculating the days and hours available for work, these are two different things.  In order to calculate months using the NETWORKING days, you need to assume that a MONTH is XX working days and use that number (XX) consistently.  That is my opinion :)

A different approach would be to obtain NETWORKING days for each month, per year, and have its average that as a reference for the XX (which I have done in the example and is....22 , 21.5 actually but rounded...it's 22 :) )

If you want to calculate differently please provide us with more information.
lapsed-months-considering-start--an.xlsx
0
 

Author Comment

by:Excellearner
ID: 41744052
xtermie,

Thank you. You have explained it very well.

I will shortly send you how treasury functions (banks/interbank markets/settlement systems) consider a month.

Thank you
0
 
LVL 18

Expert Comment

by:xtermie
ID: 41768442
Author never came back and all were valid answers
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

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…
This article describes a serious pitfall that can happen when deleting shapes using VBA.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

661 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