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

blbat

Active Member
Joined
Mar 24, 2010
Messages
289
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?
 

blbat

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

sandy666

Well-known Member
Joined
Oct 24, 2015
Messages
3,821
post #2 contain 5 spaces
here is the same



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
289
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
289
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

Well-known Member
Joined
Oct 24, 2015
Messages
3,821
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
289
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

Well-known Member
Joined
Oct 24, 2015
Messages
3,821
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
35,508
Office Version
2010
Platform
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.
 

Forum statistics

Threads
1,082,300
Messages
5,364,386
Members
400,796
Latest member
vrcdesktop

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top