Remove last character if it is a number

AliGeeJay

New Member
Joined
Nov 28, 2018
Messages
14
Office Version
  1. 365
Platform
  1. Windows
I am trying to find a way to remove the last character from a cell if it is a number.

In the example below I have email addresses in cells A2 and A3. The formula in cell B2 converts the email address to its proper name. The example formula is shown in Cell D2.

As shown in Cell B3 the formula returns the name with a number at the end, as there is a number in the email address.

Is there a method whereby I can incorporate another formula into that shown in Cell D2 to remove the number from the end IF a number exists.

Email Test.xlsx
ABCDE
1Email AddressNameExpected Result
2debbie.smith@noemail.comDebbie SmithDebbie Smith=PROPER(SUBSTITUTE(LEFT(C1,FIND("@",C1)-1),"."," "))
3william.jones2@noemail.comWilliam Jones2William Jones
4
Sheet5
Cell Formulas
RangeFormula
B2:B3B2=PROPER(SUBSTITUTE(LEFT(A2,FIND("@",A2)-1),"."," "))
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
How about
Excel Formula:
=TEXTJOIN(" ",,TAKE(PROPER(TEXTSPLIT(A3,{".","@"},SEQUENCE(10,,0))),1,2))
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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