Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 54
  • Last Modified:

lapsed months considering start, and end dates coinciding with holidays

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
Excellearner
Asked:
Excellearner
  • 5
  • 4
  • 3
  • +1
3 Solutions
 
Rob HensonIT & Database AssistantCommented:
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
 
ExcellearnerAuthor Commented:
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
 
xtermieCommented:
=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
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!

 
Rgonzo1971Commented:
Hi,

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

Open in new window

Regards
lapsed-months-considering-startV1.xlsx
0
 
Rob HensonIT & Database AssistantCommented:
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
 
ExcellearnerAuthor Commented:
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
 
ExcellearnerAuthor Commented:
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
 
Rob HensonIT & Database AssistantCommented:
@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
 
xtermieCommented:
Rob is right, try that and it will work...Thanks Rob
due to my regional settings there are ; instead of , in Excel functions
0
 
ExcellearnerAuthor Commented:
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
 
xtermieCommented:
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
 
ExcellearnerAuthor Commented:
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
 
xtermieCommented:
Author never came back and all were valid answers
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 4
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now