Formula to Remove Last Alpha Characters

legalhustler

Well-known Member
Joined
Jun 5, 2014
Messages
1,214
Office Version
  1. 365
Platform
  1. Windows
I have the following 8A, 20C, 110J. I want a formula to remove the letters from the far right, so that it returns 8, 20, 110. Letters can only be from A-Z. I think it's a pretty simple formula but my brain is making me think of something more complicated.

Would like to avoid using any helper columns.
 
Last edited:

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
If there is only one letter and it's always on the right then just use

=LEFT(A1,LEN(A1)-1)

otherwise supply data that doesn't conform to that pattern
 
Upvote 0
try this

Code:
=IF(AND(CODE(RIGHT(A1,1))>=65,CODE(RIGHT(A1,1))<=90),LEFT(A1,LEN(A1)-1),A1)
 
Upvote 0
I tried this one and the one below with no luck. Below is what I have and I am trying to delete the L and keep the decimal point.

Local USGATrend
RiverviewNumberPlayer NameIndexIndex
Riverview115122AARNESS, VERLE24.3 25.3L
North Golf Course115201ABEEL, MYRON12.4 12.4L
Lakes West118923ABLEIDINGER, LEON24.2 24.1L
Lakes West118269ABY, BILL29.0 29.0L
North Golf Course133798Adams, Samn/a 18.4L
Willowcreek39290ADAMS, TERRY16.3 16.3L
Lakes West102008ADAMS, TOM15.9 16.5L
Willowcreek127484ADLER, MARCUS15.2 15.2L
Willowcreek146115ADLER, MARK19.7 19.7L

<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
It's impossible to tell how many characters you have in the last column.
When I copied and pasted to a new spreadsheet it added a space at the end (this could be the fault of the forum or you may indeed have "L " at the end of each value in that column.

Anyway this works after copying and pasting your data

=LEFT(E2,LEN(E2)-2)+0

If this doesnt work for you then you need to paste a spreadsheet version

FYI

You cant attach files on this forum. Upload the file to an online storage site and post a link to it, though some people may not download the file for fear of viruses.
 
Last edited:
Upvote 0
Based on your sheet, it looks like you really only have two scenarios, it either ends in L or is n/a, so is easier than the original question.

=IFERROR(SUBSTITUTE(E3,"L","")+0,"n/a")
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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