Text to Columns on Two, or more, blank spaces?

blbat

Active Member
Joined
Mar 24, 2010
Messages
318
In Cell A1 I have a Huge Text String that originated in a .pdf file.

There are no useful delimiters, such as commas or semi-colons.

any text that has two or more spaces between is a field in the original .pdf

is there a way to split this out is by using two or more blank spaces as the delimiter?
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

sandy666

Banned - Rules violations
Joined
Oct 24, 2015
Messages
7,499
screenshot-120.png
 

blbat

Active Member
Joined
Mar 24, 2010
Messages
318
Thanks, that splits it out on a single space. I need it to split it out on two, or more, spaces.
 

sandy666

Banned - Rules violations
Joined
Oct 24, 2015
Messages
7,499
post #2 contain 5 spaces
here is the same

screenshot-121.png


maybe describe with details what you want to achieve or post link to the shared file (excel) with example of data
 
Last edited:

blbat

Active Member
Joined
Mar 24, 2010
Messages
318

ADVERTISEMENT

Thanks for your patience Sandy...

May be there's a lot more garbage embedded in this text string than I thought.

The data preview box is blacked out when I duplicate your steps above.

I'm sorry I can't post the file.

I'll keep trying.
 

blbat

Active Member
Joined
Mar 24, 2010
Messages
318
Thanks for your patience Sandy...

May be there's a lot more garbage embedded in this text string than I thought.

The data preview box is blacked out when I duplicate your steps above.

I'm sorry I can't post the file.

I'll keep trying.
 

sandy666

Banned - Rules violations
Joined
Oct 24, 2015
Messages
7,499

ADVERTISEMENT

try select ONE column then use Text2Columns without/with that option

check text against hard space, another name: non-breaking space. CHAR(160)
 
Last edited:

blbat

Active Member
Joined
Mar 24, 2010
Messages
318
it's actually one Cell.

I made some headway using a Find/Replace using Ten blank spaces replaced with two blank spaces. it's a painful way to have to do it.
 

sandy666

Banned - Rules violations
Joined
Oct 24, 2015
Messages
7,499
maybe
Find: two spaces
Replace: one space

then Replace All few times as you see: We couldn't find anything to replace.. etc..

btw. column can contain single cell also ;)
 
Last edited:

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
37,036
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
maybe
Find: two spaces
Replace: one space
The OP said the cell contained a "Huge Text String", so I think we can assume there are lots of single space characters in it. The OP does not want to split on these single space characters, rather, he wants to split where there are two or more adjacent space characters next to each other.
 

Watch MrExcel Video

Forum statistics

Threads
1,132,914
Messages
5,655,937
Members
418,253
Latest member
TheJackal26

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
Top