Extracting Characters from a Cell...

Nuyorican

Board Regular
Joined
Jun 17, 2003
Messages
206
Good Afternoon All...

I have a column with names and SSN's, as such

John Doe: XXX-23-6789...I want to extract "XXX -" and be left with "John Doe: 23-6789".

Thank you kindly
Benny Torres
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Hi ,

If by extract , you mean you want to remove those characters , then you can use the SUBSTITUTE function , as follows :

=SUBSTITUTE(A2, "XXX-", "")

Enter this in any unused column , say G2 ; this will then display John Doe: 23-6789.
 
Last edited:
Upvote 0
...My mistake...I did not mean to imply that parentheses were part of the characters in the string, I just used them as an emphasis. So, column reads John Doe: XXX-23-6789 and I want to be left with John Doe: 23-6789.

Thanks
 
Upvote 0
Hi ,

As I have understood you , you have the following text in one cell , say A2 :

John Doe: XXX-23-6789

You want the highlighted text to be removed ; if you want this to be done in situ , in the same cell A2 , then you will need to use VBA.

If you don't mind the output in a different cell , you can use the following formula in that cell :

=SUBSTITUTE(A2, "XXX-", "")

This will leave the following text in that cell , where this formula has been entered :

John Doe: 23-6789

Is this what you wanted ? If not , please give more details and post a few worked out examples of both input and output.
 
Upvote 0
Thank you !!! The column I had was part of another formula, obviously creating a conflict. I copied the column and pasted to a different sheet with the values only. Everything is fine. I appreciate your patience and help.

Thanks again.
 
Upvote 0

Forum statistics

Threads
1,216,190
Messages
6,129,421
Members
449,509
Latest member
ajbooisen

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