Extract data from a text string based on criteria

Bravo33

Board Regular
Joined
Jan 10, 2008
Messages
76
I want extract multiple data from a cell.

cell A1 contains the following data:-

S=123.45 M=67.68 O=10.12

I want to copy 123.45 to cell B1 and then 67.68 to cell C1 and so on.

I have hundreds of lines of data in this format that I need to extract.

Solutions greatly appreciated.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
What about doing text to columns on column A, delimited on "=" and space, and then deleting unwanted columns?
 
Upvote 0
Tried that and the problem I should have mentioned is that the data can be in any order ie S= could be at the end.
 
Upvote 0
So, you are saying that the S value is to go into column B, the M value into column C and the O value into column D?
 
Upvote 0
This should do it:

=MID(A16,FIND("S",A16)+2,FIND(" ",A16&" ",FIND("S",A16))-FIND("S",A16)-2)

Just replace the "S" with any letter your looking for and A16 to the cell you are looking at.
 
Upvote 0
This should do it:

=MID(A16,FIND("S",A16)+2,FIND(" ",A16&" ",FIND("S",A16))-FIND("S",A16)-2)

Just replace the "S" with any letter your looking for and A16 to the cell you are looking at.

Many thanks ...................Works a treat!:)
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,280
Members
452,902
Latest member
Knuddeluff

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