Breakdown retirement years

New Contributor
I am sure this is an easy fix, but I’m trying to figure what % someone would get base on years of service. I have then service years completed using YEARFRAC. So now 0-15 years gets a certain %, 16-25 years gets a different %, and 26+ gets different %. I am able to get the 0-15 to work, can kind of get the first part 16-25 to work. Problem is if service years are greater than 25, I cannot get the formula to max the cell to a specific number, the cell should display 10 if the service head is >25.
4 Replies
best response confirmed by mtarler (Trusted Contributor)
=IFS(YEARFRAC<16, returnA, YEARFRAC<26, returnB, TRUE, 10)
I apologize for my not understanding but with returnA what cell would that reference?
Where should the yearfrac reference and where does return b reference?
So I thought you said you have the years of service as YEARFRAC so that is why i used that name. "returnA" is the value to return if years of service is 0-15 (i.e. <16), then "returnB" is the value to return if years of service is 16-25 (i.e. not <16 but is <26) and then TRUE just means to always return the next if the previous ones fail (i.e. not <26 so must be 25+, which you said should return 10).
Thank you so much, I got it to work.