if formula

rizexcel

New Member
Joined
Apr 18, 2013
Messages
20
=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})
 
Upvote 0
=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
 
Upvote 0
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)
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,718
Members
448,986
Latest member
andreguerra

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top