need formula if x<a3<y, value, else

G

Guest

I am trying to set up an accrual formula for vacation days, what I am needing
is a formula that will accrue at different rates, for example, employee earns
10 days per year up to 2 years, after 2 years, earns additional 1 day per
year to a max of 15 days per year the formula I have is not working: I am
getting a "FALSE" result for the 2nd, 3rd and 4th variables - PLEASE HELP!
=IF(C5<2,0.833333333333333,IF(2<C5<3,0.916666666666667,
IF(3<C5<4,1.08333333333333,IF(4<C5<5,1.16666666666667,IF(5<C5,1.25)))))
 
G

Guest

you can't do that. change you formula to this...

=IF(C5<2,0.833333333333333,IF(C5<3,0.916666666666667,IF(C5<4,1.08333333333333,IF(C5<5,1.16666666666667,IF(5<C5,1.25)))))

this will work because if C is not less than 2, then you don't need to check
that again.

If you don't feel comfortable with that, you can use something like this...

=IF(AND(X<A3,A3<Y),"do true","do false")
 
G

Guest

Thanks soooo much - you are a lifesaver :)

Sloth said:
you can't do that. change you formula to this...

=IF(C5<2,0.833333333333333,IF(C5<3,0.916666666666667,IF(C5<4,1.08333333333333,IF(C5<5,1.16666666666667,IF(5<C5,1.25)))))

this will work because if C is not less than 2, then you don't need to check
that again.

If you don't feel comfortable with that, you can use something like this...

=IF(AND(X<A3,A3<Y),"do true","do false")
 
G

Guest

Sloth said:
you can't do that. change you formula to this...

=IF(C5<2,0.833333333333333,IF(C5<3,0.916666666666667,IF(C5<4,1.08333333333333,IF(C5<5,1.16666666666667,IF(5<C5,1.25)))))

this will work because if C is not less than 2, then you don't need to check
that again.

If you don't feel comfortable with that, you can use something like this...

=IF(AND(X<A3,A3<Y),"do true","do false")
 
D

Dana DeLouis

An additional idea to Sloth's excellent formula might be to factor out the
1/12th part.

=IF(C5<2,10,IF(C5<3,11,IF(C5<4,13,IF(C5<5,14,15))))/12
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top