extract the data from a text string at each space using formulae

jbesr1230

Board Regular
Joined
Oct 16, 2004
Messages
96
Hello,

I would like to extract the data from a text string at each space using formula rather than text-to-column tool. the text will have 4 interior spaces and a mixture of text and numbers.

For example, in cell A10 will be: abcdef 04/13/2018 140.50 ghiab hgvjw
I would like B10 to contain: abcdef
I would like c10 to contain: 04/13/2018
I would like d10 to contain: 140.50
I would like e10 to contain: ghiab
I would like f10 to contain: hgvjw

thank you.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hi,

Here's another way:


Excel 2010
ABCDEF
10abcdef 04/13/2018 140.50 ghiab hgvjwabcdef04/13/2018140.50ghiabhgvjw
Sheet4
Cell Formulas
RangeFormula
B10=TRIM(MID(SUBSTITUTE(" "&$A10," ",REPT(" ",100)),COLUMN(A10)*100,100))


B10 formula copied across.
 
Upvote 0
Hi,

Here's another way:

Excel Workbook
10abcdef 04/13/2018 140.50 ghiab hgvjwabcdef04/13/2018140.50ghiabhgvjw
Excel 2010
<p style="width:4.8em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid rgb(187,187,187);border-top:none;text-align: center;background-color: rgb(218,231,245);color: rgb(22,17,32)">Sheet4</p><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: rgb(255,255,255)" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: rgb(255,255,255);border-collapse: collapse; border-color: rgb(187,187,187)"><thead><tr style=" background-color: rgb(218,231,245);color: rgb(22,17,32)"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">B10</th><td style="text-align:left">=TRIM(<font color="Blue">MID(<font color="Red">SUBSTITUTE(<font color="Green">" "&$A10," ",REPT(<font color="Purple">" ",100</font>)</font>),COLUMN(<font color="Green">A10</font>)*100,100</font>)</font>)</td></tr></table></td></tr></table>

B10 formula copied across.
I would be a little wary of using that exact formula. If any new columns are subsequently inserted before column A, incorrect results will be returned.

This modification, in B10 copied across to F10, would be more robust in that regard.

Excel Workbook
ABCDEF
10abcdef 04/13/2018 140.50 ghiab hgvjwabcdef04/13/2018140.50ghiabhgvjw
Split Text 1




If you are happy to have individual formulas for each column rather than "one-size-fits-all-columns", then you could consider these, copied down if required.

Excel Workbook
ABCDEF
10abcdef 04/13/2018 140.50 ghiab hgvjwabcdef04/13/2018140.50ghiabhgvjw
Split Text 2
 
Upvote 0
Another option, put in B10 and copied cross

=TRIM(MID(SUBSTITUTE($A10," ",REPT(" ",LEN($A10))),(COLUMNS($A$1:A1)-1)*LEN($A10)+1,LEN($A10)))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,212
Members
453,023
Latest member
alabaz

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