Assign number to 11 different texts

nicolehalliday

Board Regular
Joined
May 19, 2010
Messages
56
Hi,
I am trying to assign a different number to 11 separate variations of text within a range. To be specific, from D4:D103 there are eleven different text which are Moodys credit ratings (Ba1, Ba2, Ba2, B1, B2, B3, Caa1, Caa2, Caa3, Ca and C). From E4:E103 I would like to assign a number from 1-11 respectively. I tried to do this by embedding if statements into the cell but the maximum I am allowed is 8. I have also tried some formulas I found in other threads that required CTRL+SHIFT+ENTER, but none of those seemed to work for me. I am no Excel whiz so I would really appreciate some help! Thanks
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

nicolehalliday

Board Regular
Joined
May 19, 2010
Messages
56
Thanks for the reply. I still don't really understand how I can use vlookup to return a number, based on 11 different conditions (like I said, I am not experienced in Excel). Wouldn't there be 11 different lookup values? D4:D103 contains 11 different ratings that vary from Ba1 to C in no order or proper distribution. Could you give me some advice as to how I'd set up my Vlookup, or if there are other options?

Thanks
 

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
See this small example

Excel Workbook
DEFGHI
1BA11
2Ba22
3Ba33
4Ba33Caa14
Sheet2
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,016
Messages
5,834,956
Members
430,330
Latest member
drAli77

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
Top