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

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
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,223,908
Messages
6,175,306
Members
452,633
Latest member
DougMo

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