Excel IF "text" then number, IF another "text" then another number

user3491609 picture user3491609 · Apr 3, 2014 · Viewed 9.3k times · Source

In column B I want a formula that says:

  • If column A is Medium then use the value in B2 which is 150,000; if A is High then use the value in B1 which is 300,000; if A is Blank then use value in B3 which 50,000

I have bits of the formula but don't know how to include all in one formula.

=IF(ISBLANK(A9),"50,000")

Please help!

Answer

nutsch picture nutsch · Apr 3, 2014

You can do a if else structure, as in

=if(A9="Medium",$b$2,if(a9="High",$b$1,if(isblank(a9),B3,"")))

or a simpler index match:

=index($B$1:$B$3,match(A9,{"High","Medium",""},0))