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
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Please check this formula; you can use Excel's Formula Evaluate.
Ensure it matches the legal requirements.

T202010b.xlsm
AB
16Start1-Jan-00
17End20-May-20
18Months244
19Severance20
20
5a
Cell Formulas
RangeFormula
B18B18=DATEDIF(Start,End,"m")
B19B19=AND(B18>2,B18<=12)*1+(B18<36)*2+(B18=36)*1+(B18>36)*(3+INT((B18-36)/12))
Named Ranges
NameRefers ToCells
End='5a'!$B$17B18
Start='5a'!$B$16B18
 
Upvote 0
Please check this formula; you can use Excel's Formula Evaluate.
Ensure it matches the legal requirements.

T202010b.xlsm
AB
16Start1-Jan-00
17End20-May-20
18Months244
19Severance20
20
5a
Cell Formulas
RangeFormula
B18B18=DATEDIF(Start,End,"m")
B19B19=AND(B18>2,B18<=12)*1+(B18<36)*2+(B18=36)*1+(B18>36)*(3+INT((B18-36)/12))
Named Ranges
NameRefers ToCells
End='5a'!$B$17B18
Start='5a'!$B$16B18
Hi Dave, thanks for this the formula in B19 is not correctly working for less than 3 months or 3 months to one year.

For 6 months its showing 3 weeks or pay and for less than 3 months its showing 2 weeks of pay?
 
Upvote 0
T202010b.xlsm
AB
16Start1-Sep-20
17End31-Dec-20
18Months3
19Severance1
20
5a
Cell Formulas
RangeFormula
B18B18=DATEDIF(Start,End,"m")
B19B19=AND(B18>2,B18<=12)*1+AND(B18>12,B18<36)*2+(B18=36)*3+(B18>36)*(3+INT((B18-36)/12))
Named Ranges
NameRefers ToCells
End='5a'!$B$17B18
Start='5a'!$B$16B18
 
Upvote 0
You could try using a Lookup table but you would still need to add the last part

T202010b.xlsm
ABCDEFG
1500
16Start1-Jan-18231
17End31-Dec-202352
18Months35363
19Severance2
5a
Cell Formulas
RangeFormula
D16D16=LOOKUP(B18,F15:G18)+(B18>36)*INT((B18-36)/12)
D17D17=LOOKUP(B18,{0,0;3,1;35,2;36,3})+(B18>36)*INT((B18-36)/12)
B18B18=DATEDIF(Start,End,"m")
B19B19=AND(B18>2,B18<=12)*1+AND(B18>12,B18<36)*2+(B18=36)*3+(B18>36)*(3+INT((B18-36)/12))
 
Upvote 0
T202010b.xlsm
AB
16Start1-Sep-20
17End31-Dec-20
18Months3
19Severance1
20
5a
Cell Formulas
RangeFormula
B18B18=DATEDIF(Start,End,"m")
B19B19=AND(B18>2,B18<=12)*1+AND(B18>12,B18<36)*2+(B18=36)*3+(B18>36)*(3+INT((B18-36)/12))
Named Ranges
NameRefers ToCells
End='5a'!$B$17B18
Start='5a'!$B$16B18
Hi Dave. Your solution was working great until I got to someone who had a long tenure. I forgot to say in my question

Greater than 3 years = 3 weeks plus 1 weeks for every year worked thereafter

that it was up to a max of 8 weeks.

Can you tweak the formula so that this works correctly?
 
Upvote 0
Your profile doesn't show your Excel version. I added am example with Excel 365' Let function.

I may not have retained the file with the example that you show. Please test the version that you prefer.

T202010b.xlsm
ABCDE
14with 365
15StartEndSeveranceSeveranceSeverance
1631-Dec-1031-Dec-20888
5a
Cell Formulas
RangeFormula
C16C16=LET(mo,DATEDIF(Start,End,"m"),LOOKUP(mo,aL)+(mo>36)*MIN(5,INT((mo-36)/12)))
D16D16=MIN(8,LOOKUP(DATEDIF(Start,End,"m"),aL)+(DATEDIF(Start,End,"m")>36)*INT((DATEDIF(Start,End,"m")-36)/12))
E16E16=LOOKUP(DATEDIF(Start,End,"m"),aL)+(DATEDIF(Start,End,"m")>36)*MIN(5,INT((DATEDIF(Start,End,"m")-36)/12))
Named Ranges
NameRefers ToCells
'5a'!End='5a'!$B$16C16:E16
'5a'!Start='5a'!$A$16C16:E16
 
Upvote 0
T202010b.xlsm
ABCDEFGH
1StartEndMonths Severance
231-Dec-0031-Dec-2088800
331
4122
5363
6484
7605
8726
9847
10968
11
5a
Cell Formulas
RangeFormula
C2C2=LOOKUP(DATEDIF(A2,B2,"m"),aL)+(DATEDIF(A2,B2,"m")>36)*MIN(5,INT((DATEDIF(A2,B2,"m")-36)/12))
D2D2=LOOKUP(DATEDIF(A2,B2,"m"),G2:H10)
E2E2=LOOKUP(DATEDIF(A2,B2,"m"),rL)
Named Ranges
NameRefers ToCells
rL='5a'!$G$2:$H$10D2:E2
 
Last edited:
Upvote 0
Hi
Your profile doesn't show your Excel version. I added am example with Excel 365' Let function.

I may not have retained the file with the example that you show. Please test the version that you prefer.

T202010b.xlsm
ABCDE
14with 365
15StartEndSeveranceSeveranceSeverance
1631-Dec-1031-Dec-20888
5a
Cell Formulas
RangeFormula
C16C16=LET(mo,DATEDIF(Start,End,"m"),LOOKUP(mo,aL)+(mo>36)*MIN(5,INT((mo-36)/12)))
D16D16=MIN(8,LOOKUP(DATEDIF(Start,End,"m"),aL)+(DATEDIF(Start,End,"m")>36)*INT((DATEDIF(Start,End,"m")-36)/12))
E16E16=LOOKUP(DATEDIF(Start,End,"m"),aL)+(DATEDIF(Start,End,"m")>36)*MIN(5,INT((DATEDIF(Start,End,"m")-36)/12))
Named Ranges
NameRefers ToCells
'5a'!End='5a'!$B$16C16:E16
'5a'!Start='5a'!$A$16C16:E16
Dave, thanks for replying, Sorry If I'm being dumb, I am a little confused now. This is the ask:

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 week for every year worked thereafter (up to a mx of 8 weeks)

So far the formula I am using is:

=IF(B5="BC",AND(B12>2,B12<=12)*1+AND(B12>12,B12<36)*2+(B12=36)*3+(B12>36)*(3+INT((B12-36)/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))

B5 = Region
B2 is "length of Service" in months

I'm a bit confused how the new bit fits in with all that. I would prefer not to use a lookup if there is a way round it?
 
Upvote 0

Forum statistics

Threads
1,214,806
Messages
6,121,667
Members
449,045
Latest member
Marcus05

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