# if formula

#### rizexcel

##### New Member
=IF(K21="A",4,IF(K21="A-",3.7,IF(K21="B+",3.3,IF(K21="B",3,IF(K21="B-",2.7,IF(K21="C+",2.3,IF(K21="C",2,IF(K21="C-",1.7,0))))))))

above formula accepts 8 conditions. If more than 8 required then what will be the solution. Please help

### Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Hi

Couple of options, first to make a lookup table and use VLOOKUP. If you have no space for the table you can use LOOKUP.

Excel 2007
ABCDEF
3A4A4
4A-3.7A4
5B+3.3
6B3
7b-2.7
8C+2.3
9C2
10C-1.7
Sheet1
Cell Formulas
RangeFormula
F3=VLOOKUP(E3, \$A\$3:\$B\$10, 2, 0)
F4=LOOKUP(E4, {"A","A-","B+","B","B-","C+","C","C-"}, {4,3.7,3.3,3,2.7,2.3,2,1.7})

if you see there is some difference.

if you see there is some difference.

you just changed the crietaria

=LOOKUP(E4, {"A","A-","B+","B","B-","C+","C","C-"}, {4,3.7,3.3,3,2.7,2.3,2,1.7})

"B" and "A-" return same value i.e. 3.7
"C-" and "C+" return same value i.e. 1.7

You could try a single VLOOKUP in that case.

=VLOOKUP(F4, {"A",4;"A-",3.7;"B+",3.3;"B",3;"b-",2.7;"C+",2.3;"C",2;"C-",1.7}, 2, 0)

Replies
8
Views
182
Replies
2
Views
278
Replies
2
Views
199
Replies
10
Views
160
Replies
7
Views
296

1,196,500
Messages
6,015,561
Members
441,901
Latest member
joshtfin

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back