Solved

lapsed months considering start, and end dates coinciding with holidays

Posted on 2016-08-04
13
38 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
  • 5
  • 4
  • 3
  • +1
13 Comments
 
LVL 31

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 17

Assisted Solution

by:xtermie
xtermie earned 125 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
 
LVL 48

Accepted Solution

by:
Rgonzo1971 earned 250 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 31

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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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 31

Assisted Solution

by:Rob Henson
Rob Henson earned 125 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 17

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 17

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 17

Expert Comment

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

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
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

20 Experts available now in Live!

Get 1:1 Help Now