Text to columns with multiple spaces

bieske22

New Member
Joined
Jun 27, 2017
Messages
2
Hello everyone,

I have a XLS file containing data from my banking account. I can use text to columns to split the cells into multiple columns. The data is split by a "," but the last cell (description) uses multiple spaces instead of ",".

For example:

Account numberCURTransaction dateBeginEndTransactionDescription
123456789EUR201928115,650.005,350.00-300.00SEPA 964789784 BIC: BANKUS2K NAME: J. Morrison Description: Cash managment
987654321USD2019281115,321.0015,471.00150.00SEPA 546848 BIC: BANKUS3A NAME: L. Jefferson Description: Salary

Example1.png



Is there a way to extract the last column into multiple columns using a condition like: when there is more then one space: split data into more columns. So: SEPA|964789784|BIC: BANKUS2K|NAME: J. Morisson|Description: Cash|

Thank's in advance!

PS if the spaces are not visible in the above example, please view the attached image.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Judging by that data you can use both comma & space as the delimiters, just make sure you check the "Treat consecutive delimiters as one" box
 
Upvote 0
Upvote 0
Ensures that there are 2 blank spaces between the quotes

=TRIM(MID(SUBSTITUTE(" " & $G2," ",REPT(" ",100)),COLUMNS($H$1:H1)*100,100))

 
Upvote 0
Agrr the editor removes the 2 spaces. Another try:
Code:
=TRIM(MID(SUBSTITUTE("  " & $G2,"  ",REPT(" ",100)),COLUMNS($H$1:H1)*100,100))
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,694
Members
448,979
Latest member
DET4492

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