Part-time AL calculation - excel

I know this isn't necessarily programming but I have used this community many a time and you have always been able to provide guidance or an answer.
My business have asked me to calculate the Annual Leave for all of our staff for 2019 and update this. They have altered the way they want the AL to be calculated and so the previous calculator I built is now obsolete.
I have managed to make the calculation work for my full time staff as I am not having to take their FTE into consideration, even when they move up to a higher allocation of AL, based on their service with the company.
When it comes to part time staff, we have to also add in the bank holidays as they are entitled to them, and then take out the hours that they would be working on those bank holidays.
My issue is when the agent changes allocation half way through the year.
This is the calculation for an agent that stays within their allocation for the whole year.
(Allocation+BankHolidays)x(FTE)x(TimeWithinYearSpentInAllocation)
So as an example the calculation would be:
(172.5+(8x7.5))x(15/37.5)x(365/365)=93
From that number we would then subtract however many hours they would be "working" on bank holidays.
My issue is when they change allocation the below calculation doesn't work.
(172.5+(3x7.5))x(15/37.5)x(120/365)+(187.5+(5x7.5))x(15/37.5)x(245/365)= 88 (rounded)
Can anyone help me on a calculation that will help me get there?
Regards,
Jordan.

Your problem is with the bank holidays. Just remove the allocation part and comapre the results:
((8*7,5))*(15/37,5)*(365/365)=24
((3*7,5))*(15/37,5)*(120/365)=3
((5*7,5))*(15/37,5)*(245/365)=10
this doesnt make sense. I dont know laws in your country, but for me if I work over public holidays I am entiteled to the same number of hours leave but here you calculate that if you work for 3 days of public holidays you are entiteled for 3 hours of leave. Shouldnt the days*hours be added after the multiplication of the allocation?

Related

How do you stop a draw commission after reaching a certain number while continuing commission earned after draw limit

so im very new to excel and I have a problem I need to solve for an internship im applying for. As a heads up I apologize for any confusion, but im happy to answer any questions that I may have left out from the explanation. Regardless I would really appreciate some help!
Question:
If someone starting at a company is allowed a draw of $5,000 a month if they earn a commission of less than $5,000, up to $30,000 within the first 12 months. If they make more than $5,000 in commission, they don't automatically get a draw of $5,000. After the first 12 months, regardless of their commission, they no longer are granted a draw.
How do I automate a draw up until $30k total commission if less than $5k for the first 12 months, and stopping the draw automation after either of those conditions are met while maintaining commission earned indefinitely.
What I have done so far
Again I probably formatted the whole book incorrectly for this. But thats the formula I have made for the calculation so far but I dont know how to make the draw stop after either 12 months or after reaching $30k automatically.
EDIT: heres the formulas I have made so far. Again im just starting to learn this so im probably far off. Sorry I forgot to add my formula

Having problems spreading expense over months with partial month calculation

I am writing a nested if statement that will calculate monthly expense based on an "Expense Frequency" option. Most of them see to be working but I have two that will not work for some reason.
The first problem is the "Fixed" option - I want this to put the whole expense rate in the first month of the expense period. For some reason it is not triggering in the first month. I feel like this might be a simple fix?
The second problem is a little more complex. It is the "Spread Amount" option. When the months are full calendar months the calculation is easy, divide total expense amount by # of months. But when I factor in partial months the calculation diverges from what I am looking for. The shorter the time duration, the larger the variance is from the total expense. When I stretch the expense over a longer period the variance shrinks. It is a pretty complex calculation (I think) and basically I want to use days out of the month for the calculation in the partial months (first and/or last) and then whole months in the middle. I have attempted this in my attached spreadsheet and I thought it might work but it isn't. Is anyone able to help me out here? I would even be satisfied with a succinct explanation of why this calculation isn't possible / doesn't make sense / cannot be done so I can explain this to my boss. I am providing a cash reward for this if it can be handled in the next three hours. Please help!! Thank you!
This is my formula
=IF($I9="Spread Amount",IF(AND($J9<=O$6,$K9>=O$5),IF(EOMONTH($J9,0)=O$6,(($M9)/(DATEDIF($J9,$K9,"m")+1)((O$6-$J9+1)/O$4)),IF(EOMONTH($K9,0)=O$6,IF(EOMONTH($K9,0)=O$6,(($M9)/(DATEDIF($J9,$K9,"m")+1)(($K9-O$5+1)/O$4))),($M9-IF(ISERROR(HLOOKUP($K9,$6:9,$XFD9,0)),HLOOKUP(EOMONTH($K9,0),$6:9,$XFD9,0),0)-IF(ISERROR(HLOOKUP($J9,$6:9,$XFD9,0)),HLOOKUP(EOMONTH($J9,0),$6:9,$XFD9,0),0))/(DATEDIF($J9,$K9,"m")))),0),IF(O$7>$K9,0,IF($I9="EOQ",IF(OR(MONTH(O$7)=3,MONTH(O$7)=6,MONTH(O$7)=9,MONTH(O$7)=12),$M9,0),IF($I9="Spread Evenly",IF(AND($J9<=O$6,$K9>=O$5),IF(EOMONTH($J9,0)=O$6,$M9*((O$6-$J9+1)/O$4),IF(EOMONTH($K9,0)=O$6,$M9*(($K9-O$5+1)/O$4),$M9)),IF($I9="Fixed",IF(AND($J9>=O$5,$J9<=O$6),$M9,0),IF($I9="Repeat Annually",IF(MONTH($J9)=MONTH(O$6),$M9,0),0))),IF($I9="Odd Month",IF(ISODD(MONTH(O$6)),$M9,0),IF($I9="Daily",IF(AND($J9<=O$6,$K9>=O$5),IF(EOMONTH($J9,0)=O$6,($M9/($K9-$J9+1))(O$6-$J9+1),IF(EOMONTH($K9,0)=O$6,($M9/($K9-$J9+1))($K9-O$5+1),($M9/($K9-$J9+1))*O$4)),0))))))*1)
This is what the spreadsheet looks like

How to display the past 17 trading days (business days) when looking up Stock History in excel

I'm using the new STOCKHISTORY function in Excel and I'd like to always display the past 17 trading days from the point I indicate. The problem is with long weekends and holidays this alters the amount of business between two dates. I'm not sure if this will be a difficult question because I think the solution is not dependent on the fact that I'm using the STOCKHISTORY function. I have attached a photo with a simple explanation. On the left the formula for STOCKHISTORY is =STOCKHISTORY(E2,C4-C6,C4,0,1,0,2). This displays 17 business days because 22 is the magic number. On the right though if I query July 22nd with 22 day difference I only get 16 days. This is further wrong on many other dates.
I am open to having a separate reference on another sheet that has dates/formulas. I tried this but couldn't figure out a formula to pull down. Photo B displays an example of the correct number of dates that would show 17 trading days. I am also open to displaying more than 17 trading days as in the future I will need to alter the amount of trading days needed (I might need to display 15 days or 20 days).
In my head I feel like the answer has something to do with the NETWORKDAYS function and/or I should make a list of all the trading days in a year and then make a formula taking the current day and taking away a specific day. Or I could be totally wrong and the answer is obvious.
So I figured out an answer after reading some documentation. There is most likely better answers but it solves the problem enough.
So I created a list of all trading days (business days) as you can see in column O. Then in Column L a list of nearby holidays (Only needed a few exceptions). Then using the formula =(O35)-(WORKDAY(O36,-17,$L$35:$L$36)) I get the right solution which I verified in my example photo posted earlier. You could theoretically get a different number when doing your own calculations (i.e the answer 24 and 23 are both correct).

Working out number of days between 2 dates based on a specific premise

I'm wondering if anyone can help me. I have a spreadsheet which I use to populate scheduled meetings of various venues (at the moment these dates I enter in manually from a reference sheet as I don’t know how to do it with a formula).
Each week, when staff go to the venue for their meeting I then enter in (again manually) what date they actually went to the venue for the meeting.
What I then have to do, is work out if they went to the meeting within our agreed time-frame, and if not, how many days late were they. However, this calculation part will just take days to do by hand as there are so many meetings to analyse.
To work out if someone is within time frame or is late, it works on this premise:
If your meeting was scheduled to take place in say week 40, you have until the Friday of week 41 to go. Any working day after that is a day late (so if for example you ended up going to the meeting on the Tuesday in week 42 you would be 2 days late). Weekends and holidays should not be included in the calculation as staff don't work on bank holidays.
The link shows an example of how this looks - you can pretty much ignore the first tab as that's just me working out some example dates to put into the main tab and the last tab is the bank holidays for the remainder of this year and next.
https://docs.google.com/spreadsheets/d/1KaEAB59311W8_M1FdAL96753SirqY3dtl4eTzIruzK8/edit?usp=sharing
Thanks so much in advanced for reading this, and if anyone is able to help or has any ideas on how to even get started with this I’d really welcome your thoughts !
Okay, this was my best attempt at this for the time I've got now - This will work if the max amount of time that a scheduled meeting can take place is up to 2 weeks beyond the original limit - anything more than that and it will be off, but you could change that IF formula to account for that:
=IF(D2-(B2+13-WEEKDAY(B2))<0,0,IF(D2-(B2+13-WEEKDAY(B2))>7,D2-(B2+13-WEEKDAY(B2))-4,D2-(B2+13-WEEKDAY(B2))-2))
Screenshot from posted file:

given Data set, analyze to come up with possible out comes in excel

I know this looks simply to you but for me this is heavy critical thinking. Help me to improve my question if not clear and i will edit the post question. The instruction is to illustrate what are the possible outcomes such as (charts, tables etc.) based on the given dataset. 3 things to understand
1. Total Booking request
2. Total accepted booking
3. Total completed
the scenario in here is there is a company x who offers a service(Vehicles used for transporting goods) from one city to another.
The question is how am i going to illustrate useful reports based on the given dataset. In my own understanding i tried to come up first with the idea of statistical reports that illustrates how progressive is the company every single month, also their performances if they are failed or not with their monthly target deliveries ex: target for january is to do 20 deliveries per day and i already did this reports but the thing that i want to figure out is how am i going to illustrate using charts the Note : Schedule Booking = a booking can be requested one day, but completed another day (ex. I booked a delivery for next Saturday) this note was shown below
as i understand this note there are some scenario that the completed booking could be done also not just in a day but maybe could be done after a week. self-realization. Help me to figure this out, how am i going to solve the note.
this is my current output:
this the give dataset
and this is the instruction
Hi,please inform me with my flaws about my explanations that needed to rephrase the post. Thankyou i just need some advice.

Resources