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

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
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,224,812
Messages
6,181,085
Members
453,021
Latest member
Justyna P

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