Extracting several words from a text string

FKalinx

New Member
Joined
Jul 2, 2014
Messages
39
Hi there,

I am looking at extracting several words from a text string.

In this example:

#interestedin-bus #interestedin-car #interestedin-train #interestedin-bus #interested-in-bike #interested-in-car

I need bus car train bus bike car returned ideally in multiple cells so I can analyse their frequency.

I have tried the =RIGHT(A2,LEN(A2)-SEARCH("-",A2)) but it only picks up the first instance. I then thought I could transpose the text into multiple cells and then run this formula but can't work out how to transpose using blank spaces.

Any help, much appreciated.
 

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
As a good rule of thumb - if you have a question re: Excel, go to an Excel forum (like here, for example). If you have a question re: Google Sheets, go to a Google Sheets forum.You do understand, don't you, that they're entirely different pieces of software?

The formula is not throwing up an error - in fact, the formula's very good. It is Google Sheets that is throwing up an error, and frankly I'm not surprised. It says - very clearly - "Error: Unknown function: 'FILTERXML'" That means that Excel-specific formulas are not understood on that completely different piece of software known fondly as Google Sheets.

Solution? Ask the question at a Google Sheets forum.

1661333606411.png
 
Upvote 0
If you want to remove all "#interestedin-" out, then pick every alphabet textstrings:

Code:
=TRIM(MID(SUBSTITUTE(" "& TRIM(SUBSTITUTE(SUBSTITUTE($A2,"#interestedin-",""),", "," "))," ",REPT(" ",100)),COLUMN(A:A)*100,100))
 
Upvote 0
As a good rule of thumb - if you have a question re: Excel, go to an Excel forum (like here, for example). If you have a question re: Google Sheets, go to a Google Sheets forum.You do understand, don't you, that they're entirely different pieces of software?

The formula is not throwing up an error - in fact, the formula's very good. It is Google Sheets that is throwing up an error, and frankly I'm not surprised. It says - very clearly - "Error: Unknown function: 'FILTERXML'" That means that Excel-specific formulas are not understood on that completely different piece of software known fondly as Google Sheets.

Solution? Ask the question at a Google Sheets forum.

View attachment 72368
I am aware that they are different bits of software, hence the original question. If I thought they were the same, I wouldn't have asked it...

I uploaded the Excel file to Google Drive so I could share it with the members here. If you don't download as an Excel file, Google will convert it into a Google Sheet. The error still stands in my Excel - see screenshot.
 

Attachments

  • Screenshot 2022-08-24 at 10.39.15.png
    Screenshot 2022-08-24 at 10.39.15.png
    246.8 KB · Views: 6
Upvote 0
If you want to remove all "#interestedin-" out, then pick every alphabet textstrings:

Code:
=TRIM(MID(SUBSTITUTE(" "& TRIM(SUBSTITUTE(SUBSTITUTE($A2,"#interestedin-",""),", "," "))," ",REPT(" ",100)),COLUMN(A:A)*100,100))
You're a star, thanks so much Bebo021999. It works perfectly.
 
Upvote 0
You're a star, thanks so much Bebo021999. It works perfectly.
13 posts to get the result!
Because you did tell us that data was stored in candidates "#interestedin-" what subjects, and need split the subjects out...
Cheer!
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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