Find first Alpha Character from right side of a string

Kmac224

New Member
Joined
Jun 15, 2015
Messages
47
Office Version
  1. 2010
Platform
  1. Windows
Hi All,

I'm trying to use a formula to find the first alpha character from the right of a string.

For example, from the below, I'd expect "C" returned.

BABA US 09/21/18 C165
<colgroup><col width="161" style="width: 121pt; mso-width-source: userset; mso-width-alt: 5888;"> <tbody> </tbody>

Thanks!!
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Doesn't seem to work for an all alpha entry like "abc"
I had not assumed that was a possibility. The fix is easy enough though (still normally-entered)...

=IFERROR(RIGHT(TRIM(SUBSTITUTE(A1,LOOKUP(9E+99,--RIGHT(A1,ROW($1:$99))),""))),RIGHT(TRIM(A1)))
 
Last edited:
Upvote 0
I had not assumed that was a possibility. The fix is easy enough though (still normally-entered)...

=IFERROR(RIGHT(TRIM(SUBSTITUTE(A1,LOOKUP(9E+99,--RIGHT(A1,ROW($1:$99))),""))),RIGHT(TRIM(A1)))
By the way, I included those TRIM function calls because I thought I "saw" a space character on the end of the text I copied, so I thought I would protect against it, but now I do not see that character so I am not sure what I did originally to get it. Anyway, if the data is pure and there will never be any trailing spaces, you can use this slightly shorter formula....

=IFERROR(RIGHT(SUBSTITUTE(A1,LOOKUP(9E+99,--RIGHT(A1,ROW($1:$99))),"")),RIGHT(A1))


EDIT NOTE: I should point out that the above formula and the ones in the message above it and in Message #8 all assume the number at the end of the text (when there are numbers on the end) will never have a leading zero at the front of them.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,022
Messages
6,122,721
Members
449,093
Latest member
Mnur

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