Hi
I have a problem with a calculation i am trying to do. I have to calculate holiday allocation for staff but i my company also offers length of service bonus days.
After 5 years you get 1 extra day, after 10 years you get 2, after 15 you get 3 and so on. In my sheet i have a formula based on their start date that tells me their length of service in the following format: 10 years, 2 months.
I have put an IF Statement in for each of the different milestone criteria but the result is not coming back so i know i am missing something. Is there something wrong with the formula itself or is there a better one that will allow me to put the start and end of the range i want it to look at? For example can i tell it to say if between 5 years and 9 years 11 months put 1, if between 10 years and 14 years 11 months put 2 etc in column H.
I have attached the sheet to show what i have done so far, any help would be much appreciated!!
Thanks
Mark
Last edited by marktaylor; 11-26-2009 at 06:28 AM. Reason: Now Solved
Perhaps simply
Given the increment of output is constant (0-5) you could use a basic MATCH without need for LOOKUP (and result_vector) but the above offers more flexibility should you ever choose to adjust the bonus days.E2: =IF(SUM(D2),LOOKUP(DATEDIF($D2,NOW(),"y"),{0,5,10,15,20,25},{0,1,2,3,4,5}),"") copied down
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Why not use this in H1:edit: and I think DonkeyOte means putting his formula in H1 as well.=FLOOR(FLOOR(DATEDIF(D2,NOW(),"y"),5)/5,1)
Last edited by rwgrietveld; 11-26-2009 at 06:18 AM.
Looking for great solutions but hate waiting?
Seach this Forum through Google
www.Google.com (e.g. +multiple +IF site:excelforum.com/excel-general/ )
www.Google.com (e.g. +fill +combobox site:excelforum.com/excel-programming/ )
Ave,
Ricardo
Thank you both for your help. I have put the in both formulas suggested and they both work! This is much appreciated!!!
Mark![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks