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

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
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,215,069
Messages
6,122,952
Members
449,095
Latest member
nmaske

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