Help Please! IF formula (i hope that's right!)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need help with what is probably relatively simple, but I probably using the
wrong solution. Maybe it should be a look up? Basically, I need to have the
accrual rate equal a specific amount based on the "type". i.e. = salary=16
or hourly=8

A B C
type accrual rate (8) final result (rate * 12)
1 "salary" " " (16)
2 "salary" " " (16)
3 "hourly" " " (8)

All feedback is greatly appreciated.
 
B2=CHOOSE(MATCH($A2,{"salary";"hourly"},0),16,8)

You can have up to 28 different types in array parameter (the one between
curly braces) for MATCH, along with according responses as parameters in
CHOOSE. The general syntax is
=CHOOSE(MATCH(LookupValue,{Value1;Value2;...;ValueN},0),Response1,Response2,...,ResponseN)
with N<=28

The another possible solution:
B2=((A2="salary")*2+(A2="hourly"))*8

In general:
=((A2=Value1)*X1+(A2=Value2)*X2+ ... +(A2=ValueN)*XN)*8
 
Avri,
Awesome! Someone who really knows formulas. Thanks so much. I tried both
and they work great!
Karen
 
Back
Top