Excel Formulas

S

Struggling

I need to create a formula on excel. If a person is under 40 he will not
need a medical until he is 40. If he reaches 40, he will have to have one
every 5 years and if he is over 50, it will be every year...I just cant get
it to work!!

Thanks in advance.
 
E

Eduardo

Hi,
suppose that the age is in cell C2 and you want the formula in D2 so enter

=if(C2<40,"Medical Exam not needed", if(C2=>40,"Medical exam every 5
years","Medical Exam every year"))

if this helps please click yes thanks
 
F

fisch4bill

I tried Eduardo's formula and it's close, but, I think this minor alteration
will do what you're asking:

=IF(C3<40,"Medical Exam not needed",IF(C3>50,"Medical exam every
year","Medical Exam every 5 years"))

In the original formula, the logic gives the same result whether the age is
between 41 and 50, or is greater than 50. I tried age values of 54, 45, 32,
51, 50, 49, 40, and 39, and all gave what I'm reading as the correct result.

Hope this helps.
Bill
 
Top