Trim/Format Problem

sand112281

Board Regular
Joined
Aug 6, 2004
Messages
75
I need some help with trimming/formating some information. I downloaded bond ratings from a website and it returned the ratings and the credit outlook for the bond. eg. AA- *-, BBB- *+, or just AA-, BBB+. The information is in columns with the rating next to the company name. What I want is just the credit outlook for the bonds ( *- or *+ or 0) or some number/symbol to show if it is a positive, negative nor no outlook.
Eg.


Name Rating Outlook
Ford A *+ +
GM A 0
Exxon BBB *- -

Thanks for any help.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Tazguy37

MrExcel MVP
Joined
May 28, 2004
Messages
4,237
Please check and make sure I've created the table correctly -- it's a bit hard to tell which stuff is in which columns when written out in text like that.
updatelinkstest.xls
ABCD
1NameRatingOutlook
2FordA++
3GMANone
4ExxonBBB--
Sheet2


Formula in C2 (copied down) is:
=VLOOKUP(RIGHT(B2,1),{"+","+";"-","-";"A","None";"B","None";"C","None";"D","None"},2,0)

Yep, that's all one line. All you formula gurus out there: Is there a shorter way to do this? And any way to mask the #N/A if you enter something like "h"?
Anyways, hope that helps!
 
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,167,966
Messages
5,856,567
Members
431,820
Latest member
martel_9

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