Formula to remove last digit if it's a number

Blunder1

Active Member
Joined
Jun 2, 2010
Messages
250
Hi,

I need to a formula to remove the last digit if it a number on a text string, and to remove the first charaters which will always be consisitant. Ie:- 'Sum of Trade Capture' becomes 'Trade Capture' and 'Sum of Trade Capture2' becomes 'Trade Capture'

Thanks in advance

Blunder
<TABLE style="WIDTH: 132pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=176 border=0 x:str><COLGROUP><COL style="WIDTH: 132pt; mso-width-source: userset; mso-width-alt: 6436" width=176><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD id=td_post_1731680 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 132pt; BORDER-BOTTOM: #d4d0c8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=176 height=17>
</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17></TD></TR></TBODY></TABLE>
 
Of course although these suggestions with RIGHT(A1)<"A" do perform the stated requirement ..
.. formula to remove the last digit if it a number on a text string,..
.. and the following example types may not be possible with the OPs data, they do also remove some non-digits from the end of the text string as well. My assumption is that they should not do that.

eg
Sum of Trade Capture?
Sum of Trade Capture_
Sum of Trade Capture.
 
Last edited:
Upvote 0

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Of course although these suggestions with RIGHT(A1)<"A" do perform the stated requirement .... and the following example types may not be possible with the OPs data, they do also remove some non-digits from the end of the text string as well. My assumption is that they should not do that.

Hi Peter

You are right. I assumed it's ok to remove any last character that is not a letter.
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,828
Members
452,946
Latest member
JoseDavid

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