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

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
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,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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