A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Hi,
In cell B2, enter this formula and drag down
=TEXTBEFORE(TEXTAFTER(A2,"("),")")
Hope this helps.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi there,
I must only extract the ID from values such as Lisa Francisco (W2349864). There are 1200 names in the ID embedded in parenthesis that I need to extract only the W2349864 # and put it in a separate column.
I greatly appreciate your time.
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
Answer accepted by question author
There are many ways to do this. An easy way although it has many steps is to use your Text to Columns option.
Highlight the column with your data, in this case I'm only using what you've provided.
Go to your data tab and find "Text to Columns".
Once you click that option a window for a wizard should pop up. Select the delimited option and click next.
On this second page remove the other delimiters and only select other, put your open parenthesis, you'll see the data preview split the data into 2 columns at the delimiter you use, and click next.
In this third page you can choose the format for the new columns and/or choose to remove columns you won't be needing.
For example, here I'm removing the column that will be left with the name. You can tell that because it says Skip Column in the Data Preview window on the column with the name info, if you choose to leave the name use General or Text in your Column data format. You can select the column with your id and format it if you want but for now, I will leave it this way since I need to remove the close parenthesis. Click Finish.
If you followed these steps this is what your data should look like now.
In order to remove the closed parenthesis, repeat the process with the closed parenthesis. Scroll up for all the steps this screenshot is just a brief recap.
Once done you should have just id's.
I know I gave one answer, but this is my preferred way especially if this is a task that is constantly repeated, since this will allow you to just replace the data and press refresh to get new id's extracted. I'm assuming you have a newer version of excel. I made some data to show how this would work with your 1200 rows.
This should open power query.
At this point your data should be extracted. Go to Close & Load to... to export it to your spreadsheet.
At this point I would just put my data to the right of the original data:
This is what it should look like:
Now anytime I need to get new id's I can just remove the old info and put in the new info and refresh.
Thank you Larry. I'll try this method as well. I greatly appreciate your help!
Use TextToColumns with ( as separator https://support.microsoft.com/en-us/office/split-text-into-different-columns-with-the-convert-text-to-columns-wizard-30b14928-5550-41f5-97ca-7a3e9c363ed7
After that search for ) and replace with nothing, done.
Andreas.