Severance Calculator based on Provincial Rules

kizzie37

Well-known Member
Joined
Oct 23, 2007
Messages
575
Office Version
  1. 365
Hi Hope someone can assist. I want to create a formula to calculate someones Severance pay here are the rules:

Less than 3 month = 0
3 months to 1 year = 1 week
1 year to less than 3 years = 2 weeks
3 years = 3 weeks
Greater than 3 years = 3 weeks plus 1 weeks for every year worked thereafter

I have a formula that calculates the number of years worked between 2 dates (=(End Date-Start Date)/365. I need the number of weeks payable to display in Cell B18
 
Did you read and/or try suggestion in post 9?

Why not use Lookup?
If you want to avoid the lookup, name the array of lookup information.

You didn't state what version of Excel you are using. You should update your profile.
 
Upvote 0

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
My post needs editing. If you want to avoid the lookup table, name the array of lookup information.

Your formula can probably be simpler.

Please provide complete definitions for the severance for each of the Provinces.

You could also post a few examples with expected results.
 
Upvote 0
In case someone reads this thread.
Complete information was not provided; use the relevant specifications for your industry and jurisdiction.
If you want to avoid the lookup table, you can name the array of lookup information (see E2)
The array of data for the Lookup is named rL; rL ={0,0;3,1;12,2;36,3;48,4;60,5;72,6;84,7;96,8}

The Lookup may be easier to maintain.

You could also post a few examples with expected results.

T202010b.xlsm
ABCDEF
1StartEndMonths
201-Jan-1331-Jul-21103888
301-Jun-2131-Jul-212000
431-Jul-1931-Jul-2124222
531-Jul-1831-Jul-2136333
631-Jul-1831-Jul-213633
5a
Cell Formulas
RangeFormula
C2:C6C2=DATEDIF(A2-1,B2,"m")
D2:D5D2=LOOKUP(C2,$I$2:$J$10)
E2:E5E2=LOOKUP(C2,rL)
F2:F5F2=(C2>=3)*1+(C2>=12)*1+(C2>=36)*MIN(6,(C2>=36)*(INT((C2-24)/12)))
D6D6=LOOKUP(DATEDIF(A6-1,B6,"m"),$I$2:$J$10)
E6E6=LOOKUP(DATEDIF(A6-1,B6,"m"),rL)
 
Upvote 0
In case someone reads this thread.
Complete information was not provided; use the relevant specifications for your industry and jurisdiction.
If you want to avoid the lookup table, you can name the array of lookup information (see E2)
The array of data for the Lookup is named rL; rL ={0,0;3,1;12,2;36,3;48,4;60,5;72,6;84,7;96,8}

The Lookup may be easier to maintain.

You could also post a few examples with expected results.

T202010b.xlsm
ABCDEF
1StartEndMonths
201-Jan-1331-Jul-21103888
301-Jun-2131-Jul-212000
431-Jul-1931-Jul-2124222
531-Jul-1831-Jul-2136333
631-Jul-1831-Jul-213633
5a
Cell Formulas
RangeFormula
C2:C6C2=DATEDIF(A2-1,B2,"m")
D2:D5D2=LOOKUP(C2,$I$2:$J$10)
E2:E5E2=LOOKUP(C2,rL)
F2:F5F2=(C2>=3)*1+(C2>=12)*1+(C2>=36)*MIN(6,(C2>=36)*(INT((C2-24)/12)))
D6D6=LOOKUP(DATEDIF(A6-1,B6,"m"),$I$2:$J$10)
E6E6=LOOKUP(DATEDIF(A6-1,B6,"m"),rL)
Hi Dave, sorry i didnt realize I got a response, I dont want to use a lookup table my formula
In case someone reads this thread.
Complete information was not provided; use the relevant specifications for your industry and jurisdiction.
If you want to avoid the lookup table, you can name the array of lookup information (see E2)
The array of data for the Lookup is named rL; rL ={0,0;3,1;12,2;36,3;48,4;60,5;72,6;84,7;96,8}

The Lookup may be easier to maintain.

You could also post a few examples with expected results.

T202010b.xlsm
ABCDEF
1StartEndMonths
201-Jan-1331-Jul-21103888
301-Jun-2131-Jul-212000
431-Jul-1931-Jul-2124222
531-Jul-1831-Jul-2136333
631-Jul-1831-Jul-213633
5a
Cell Formulas
RangeFormula
C2:C6C2=DATEDIF(A2-1,B2,"m")
D2:D5D2=LOOKUP(C2,$I$2:$J$10)
E2:E5E2=LOOKUP(C2,rL)
F2:F5F2=(C2>=3)*1+(C2>=12)*1+(C2>=36)*MIN(6,(C2>=36)*(INT((C2-24)/12)))
D6D6=LOOKUP(DATEDIF(A6-1,B6,"m"),$I$2:$J$10)
E6E6=LOOKUP(DATEDIF(A6-1,B6,"m"),rL)
Hi Dave

thanks for the reply. I am using your formula in F2, there is still an issue. Here is what The rules are:

1636060543113.png


I modifed slightly to account for the 2 weeks, but now its not working and for folks who have completed 1 year its saying 0?

(B12>=3)*1+(B12>=12)*1+AND(B12>12,B12<36)*2+(B12>=36)*MIN(6,(B12>=36)*(INT((B12-24)/12)))
 
Upvote 0
Hello kizzie37

The information is ambiguous and you did not provide examples of the correct results.
Please
- edit your profile so we know what version of Excel that you are using
- include a complete explanation of how the severance is to be calculated
- show the date, day, month, or year when the person would first receive 1 week, 2 weeks, etc.
- the edit to the formula added a second 2 weeks to the calculation for certain terms
- the formula calculates 1 for 1 year 2 weeks are relevant for "more" than1 year
How is this determined 1 minute, 1 day, 1 week, 1 month ... ?

With the relevant information, a formula and/or Lookup can calculate the correct result.

You can post an extract of your examples and expected results with the forum's tool XL2BB.
 
Upvote 0
HI Dave

its Excel 2018

Please see below I don't know how else to explain it. LOS = length or Service. In BC its as stated below:

the formula you gave works for longer lengths and 3 years but t snot calculating correctly from between 3 months to one year and between 1 year and 3 years

1636133070879.png


Severance.xlsx
ABC
1
2
3
4
5ProvinceBC
6
7
8
9
10Start DateJune 18, 2012
11Potential End DateMay 11, 2016
12LOS46
13DOB
14Age
15Base Salary$ 92,500
16
17Employment Standards (ESA)
18ESA PIL weeks3
19ESA PIL $ $ 5,336.54
Sheet1
Cell Formulas
RangeFormula
B12B12=DATEDIF(B10,B11,"m")
B18B18=IF(B5="BC",(B12>=3)*1+(B12>=12)*1+AND(B12>12,B12<36)*2+(B12>=36)*MIN(6,(B12>=36)*(INT((B12-24)/12))), IF(B5="AB",AND(B12>2,B12<=24)*1+AND(B12>24,B12<48)*2+AND(B12>=48,B12<72)*4+AND(B12>=72,B12<96)*5+AND(B12>=96,B12<120)*6+(B12>120)*8))
B19B19=B15/52*B18
Cells with Data Validation
CellAllowCriteria
B5ListBC, AB
 
Upvote 0
A suggestion pending information and calculation examples. I did not see your last post before I posted this.
Please review this and the next post.

The calculations assume the entire term is completed plus 1 minute. 3 months means 3 months plus 1 minute.

What is the calculation for exactly 3 months? What qualifies as more than 3 months?
What is the calculation for exactly 3 years? What qualifies as more than 3 years?
Use Formulas Evaluate Formula to review the formula

The lookup information E2 is the named Lookup information See Name Manager
name new aL
Value is ={0,0;3,1;12,2;36,3;48,4;60,5;72,6;84,7;96,8}
Review D2 =LOOKUP(C2,$I$2:$J$10) Is the Table correct?
Highlight the $I$2:$J$10 in D2's formula and press F9; the table information shows.
The formula still works with this data and this information is the value stated above for the named information.

T202010b.xlsm
ABCDEFGHIJKL
1StartEndMonths SeveranceMonthsSeveranceNotice periodLength of employment
21-Jan-2128-Feb-212000003 Months or less
31-Jan-2131-Mar-213111311 weekMore than 3 months
41-Jan-2131-Dec-21122221222 weeksMore than 1 year
51-Jan-2031-Dec-21242223633 weeksMore than 3 years
61-Jan-1931-Dec-21363334844 weeksMore than 4 years
71-Jan-1831-Dec-21484446055 weeksMore than 5 years
81-Jan-1731-Dec-21605557266 weeksMore than 6 years
91-Jan-1631-Dec-21726668477 weeksMore than 7 years
101-Jan-1531-Dec-21847779688 weeksMore than 8 years
111-Jan-1431-Dec-2196888
121-Jan-1331-Dec-21108888
1330-Jun-1331-Dec-21102888
5a_2
Cell Formulas
RangeFormula
C2:C13C2=DATEDIF(A2,B2+1,"m")
D2:D13D2=LOOKUP(C2,$I$2:$J$10)
E2:E13E2=LOOKUP(C2,aL)
F2:F13F2=MIN(8,(C2>=3)+(C2>=12)+(C2>=36)*INT((C2-24)/12))
 
Upvote 0
A suggestion pending information and calculation examples. I did not see your last post before I posted this.
Please review this and the next post.

The calculations assume the entire term is completed plus 1 minute. 3 months means 3 months plus 1 minute.

What is the calculation for exactly 3 months? What qualifies as more than 3 months?
What is the calculation for exactly 3 years? What qualifies as more than 3 years?
Use Formulas Evaluate Formula to review the formula

The lookup information E2 is the named Lookup information See Name Manager
name new aL
Value is ={0,0;3,1;12,2;36,3;48,4;60,5;72,6;84,7;96,8}
Review D2 =LOOKUP(C2,$I$2:$J$10) Is the Table correct?
Highlight the $I$2:$J$10 in D2's formula and press F9; the table information shows.
The formula still works with this data and this information is the value stated above for the named information.

T202010b.xlsm
ABCDEFGHIJKL
1StartEndMonths SeveranceMonthsSeveranceNotice periodLength of employment
21-Jan-2128-Feb-212000003 Months or less
31-Jan-2131-Mar-213111311 weekMore than 3 months
41-Jan-2131-Dec-21122221222 weeksMore than 1 year
51-Jan-2031-Dec-21242223633 weeksMore than 3 years
61-Jan-1931-Dec-21363334844 weeksMore than 4 years
71-Jan-1831-Dec-21484446055 weeksMore than 5 years
81-Jan-1731-Dec-21605557266 weeksMore than 6 years
91-Jan-1631-Dec-21726668477 weeksMore than 7 years
101-Jan-1531-Dec-21847779688 weeksMore than 8 years
111-Jan-1431-Dec-2196888
121-Jan-1331-Dec-21108888
1330-Jun-1331-Dec-21102888
5a_2
Cell Formulas
RangeFormula
C2:C13C2=DATEDIF(A2,B2+1,"m")
D2:D13D2=LOOKUP(C2,$I$2:$J$10)
E2:E13E2=LOOKUP(C2,aL)
F2:F13F2=MIN(8,(C2>=3)+(C2>=12)+(C2>=36)*INT((C2-24)/12))

Hi Dave

Thank you. I prefer not to use a lookup table and use a straight formula, it would seem almost there. We would determine 1 day past one year or 3 months or 3 years

I hope that helps
 
Upvote 0
T202010b.xlsm
ABCDEFGHIJKL
1StartEndMonths SeveranceMonthsSeveranceNotice periodLength of employment
21-Jan-2128-Feb-2120TRUE003 Months or less
31-Jan-213-Apr-2131TRUE311 weekMore than 3 months
41-Jan-213-Jan-22122TRUE1222 weeksMore than 1 year
51-Jan-203-Jan-22242FALSE3633 weeksMore than 3 years
61-Jan-193-Jan-22363TRUE4844 weeksMore than 4 years
71-Jan-183-Jan-22484TRUE6055 weeksMore than 5 years
81-Jan-173-Jan-22605TRUE7266 weeksMore than 6 years
91-Jan-163-Jan-22726TRUE8477 weeksMore than 7 years
101-Jan-153-Jan-22847TRUE9688 weeksMore than 8 years
111-Jan-143-Jan-22968TRUE
121-Jan-133-Jan-221088TRUE
1330-Jun-133-Jan-221028TRUE
5a_3
Cell Formulas
RangeFormula
C2:C13C2=DATEDIF(A2,B2+1,"m")
E2:E13E2=LOOKUP(C2,aL)
H2H2=YEARFRAC(A2,B2,1)<3/12
H3H3=YEARFRAC(A3,B3,1)>3/12
H4H4=YEARFRAC(A4,B4,1)>1
H5:H6H5=YEARFRAC(A5,B5,1)>3
H7H7=YEARFRAC(A7,B7,1)>4
H8H8=YEARFRAC(A8,B8,1)>5
H9H9=YEARFRAC(A9,B9,1)>6
H10H10=YEARFRAC(A10,B10,1)>7
H11:H13H11=YEARFRAC(A11,B11,1)>8
 
Upvote 0
The changes to the formula were not required.
The suggestion is a little more concise; try reviewing the formula with Excel's Formula Evaluate.

T202010b.xlsm
ABCDEFG
1StartEndMonths Severance
21-Jan-2128-Feb-21200
31-Jan-213-Apr-21311
41-Jan-213-Jan-221222
51-Jan-203-Jan-222422
61-Jan-193-Jan-223633
71-Jan-183-Jan-224844
81-Jan-173-Jan-226055
91-Jan-163-Jan-227266
101-Jan-153-Jan-228477
111-Jan-143-Jan-229688
121-Jan-133-Jan-2210888
1330-Jun-133-Jan-2210288
5a_3
Cell Formulas
RangeFormula
E2:E13E2=LOOKUP(C2,aL)
F2:F13F2=MIN(8,(C2>=3)+(C2>=12)+(C2>=36)*INT((C2-24)/12))
C2:C13C2=DATEDIF(A2,B2+1,"m")
 
Upvote 0

Forum statistics

Threads
1,215,425
Messages
6,124,824
Members
449,190
Latest member
rscraig11

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top