annual leave entitlement

swiss97

New Member
Joined
Oct 2, 2017
Messages
1
I am trying to calculate annual leave entitlement for staff as of 1st day 1st month of each year. Cell B4 with todays date will give him 10 years service but as of 1/1/2017 he would get 9 years service entitlement.

B4 displays fine C4 shows correct 9 years entitlement but D4 is showing 10 years entitlement because the formula is showing the now date function.

How do i change this to calculate from 1/1/2017. i have tried every calculation and function name but comes up error each time


CELL B4


23/09/2007

CELL C4

=DATEDIF(B4,DATE(2017,1,1),"y")


CELL D4

=LOOKUP(DATEDIF(B4,NOW(),"Y"),{0,"less than 1 year";1,22;2,22;3,23;4,23;5,24;6,24;7,24;8,24;9,24;10,25})
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
If you were set up like that you can just look at C4:

=LOOKUP(C4,{0,"less than 1 year";1,22;2,22;3,23;4,23;5,24;6,24;7,24;8,24;9,24;10,25})
 
Upvote 0

Forum statistics

Threads
1,223,229
Messages
6,170,881
Members
452,364
Latest member
springate

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