Multiple ifs

  • Thread starter Thread starter ab3d4u
  • Start date Start date
A

ab3d4u

Here is a quick one for you gurus. BTW thanks for your help in advance
I have three different (insurance options) values in a column that has
145 employees. I have a new rate that I have to replace. So I want a
formula that basically reads like this - if b2=100 change it to 125, if
it equals 101.25 then change it to 128.45 and last option would be if it
equals 110 then change it to 135. If I get the first row correct I will
then copy it down.
 
Here is a quick one for you gurus. BTW thanks for your help in advance
I have three different (insurance options) values in a column that has
145 employees. I have a new rate that I have to replace. So I want a
formula that basically reads like this - if b2=100 change it to 125, if
it equals 101.25 then change it to 128.45 and last option would be if it
equals 110 then change it to 135. If I get the first row correct I will
then copy it down.


=VLOOKUP(B2,{100,125;101.25,128.45;110,135},2,0)

Note that you did not indicate what you want if B2 does NOT equal one of your
three choices. The above formula will return an error in that instance. It
could be modified to do something else.
--ron
 
=LOOKUP(B2,{100,101.25,110},{125,128.45,135}) entered in C2

Could there be any other possibile values in column B?

If so, how would you want to deal with those?


Gord Dibben MS Excel MVP
 
Gord said:
=LOOKUP(B2,{100,101.25,110},{125,128.45,135}) entered in C2

Could there be any other possibile values in column B?

If so, how would you want to deal with those?


Gord Dibben MS Excel MVP






On Thu, 6 Dec 2007 17:50:34 +0000, ab3d4
(e-mail address removed)
wrote:
-

Here is a quick one for you gurus. BTW thanks for your help in advance
I have three different (insurance options) values in a column that has
145 employees. I have a new rate that I have to replace. So I want a
formula that basically reads like this - if b2=100 change it to 125
if
it equals 101.25 then change it to 128.45 and last option would be i
it
equals 110 then change it to 135. If I get the first row correct
will
then copy it down.-

Thanks Gord, It worked just fine as I did not had any thing in col B
 
Back
Top