How to selectively split cells

%3CLINGO-SUB%20id%3D%22lingo-sub-1512560%22%20slang%3D%22en-US%22%3EHow%20to%20selectively%20split%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1512560%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%20noob%20here.%20I%20have%20a%20giant%20list%20of%20data%20that%20I%20copied%20from%20a%20pdf%20online%20and%20I%20need%20to%20selectively%20separate%20it%20into%20separate%20cells%20so%20that%20I%20can%20work%20with%20it.%20Right%20now%20it%20is%20all%20in%20one%20column%2C%20with%20around%2034000%20rows%2C%20so%20doing%20this%20one%20by%20one%20is%20impossible.%20The%20data%20goes%20like%20this%3A%20name%20(usually%20several%20words)%2C%20identification%20and%20reference%20numbers%20(usually%20starting%20with%200)%2C%20then%20a%20description%2C%20which%20can%20be%20a%20combination%20of%20words%20and%20numbers.%20See%20image%20below%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%20to%20split%20this%20data%26nbsp%3B%20in%20one%20line%20into%20the%20following%3A%20Name%2C%20then%20each%20separate%20number%20in%20its%20own%20sell%2C%20and%20then%20after%20the%20long%20number%20the%20rest%20in%20one%20cell.%20For%20example%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBROWNLEE%20CHARLIE%20JR%20%7C%2001%20%7C%2000%20%7C%200194%20%7C%203%20%7C%2031%20%7C%200123000310240040000000%20%7C%20LOT%206%20BLK%202%20AIRPORT%20ESTS%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22%22%3EI%20have%20tried%20doing%20the%20text%20to%20column%20function%20using%20spaces%20but%20this%20doesn't%20align%20the%20data%20in%20one%20column.%20For%20example%2C%20with%20names%20of%20different%20lengths%2C%20I%20get%20the%20same%20reference%20number%20not%20aligned%20with%20the%20one%20above%20it%20(so%20I%20need%20to%20somehow%20insert%20blank%20cells.%20How%20do%20I%20do%20this%3F%20May%20be%20a%20tough%20problem%20but%20I%20have%20no%20idea%20so%20anything%20helps.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1512560%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1513167%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20selectively%20split%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1513167%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F723898%22%20target%3D%22_blank%22%3E%40alaskanbear52%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20in%20PDF%20data%20separated%20by%20columns%20you%20may%20try%20Power%20Query%20connector%20From%20PDF.%20If%20not%2C%20afraid%20no%20way%20if%20formal%20logic%20of%20how%20to%20separate%20is%20not%20defined.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1513352%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20selectively%20split%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1513352%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F723898%22%20target%3D%22_blank%22%3E%40alaskanbear52%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20appears%20the%20numbers%20are%20fixed%20width.%20If%20that's%20correct%2C%20then%20it%20looks%20like%20the%20hurdle%20is%20splitting%20the%20name%20from%20the%20rest%20of%20the%20text%20string.%3C%2FP%3E%3CP%3ESay%20the%20data%20is%20in%20Column%20A%20(starting%20in%20cell%20A4).%3C%2FP%3E%3CP%3EFirst%2C%20find%20the%20character%20position%20of%20the%20first%20number.%20This%20is%20an%20array%20formula%2C%20so%20you%20have%20to%20hit%20Ctrl%2BShift%2BEnter%20after%20keying%2Fcopying%20it%20into%20the%20formula%20bar.%3CBR%20%2F%3EB4%20%3DMIN(IF(ISNUMBER(--(MID(A4%2CROW(INDIRECT(%221%3A%22%26amp%3BLEN(A4)))%2C1)))%2CROW(INDIRECT(%221%3A%22%26amp%3BLEN(A4)))%2C%22%22))%3C%2FP%3E%3CP%3EExtract%20the%20name%3A%3CBR%20%2F%3EC4%20%3DTRIM(LEFT(A4%2CB4-1))%3C%2FP%3E%3CP%3EExtract%20the%20remaining%20portion%20of%20the%20string%3A%3CBR%20%2F%3ED4%20%3DMID(A4%2CB4%2CLEN(A4))%3C%2FP%3E%3CP%3ECopy%2Fpaste%20special%20-%20value%20columns%20C%20and%20D.%20Then%2C%20it%20looks%20like%20you%20can%20use%20text%20to%20columns%20(fixed%20width)%20on%20Column%20D%20to%20separate%20the%20rest%20of%20the%20data%20into%20columns.%20I%20attached%20a%20file%20you%20can%20download%20to%20look%20at.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1513373%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20selectively%20split%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1513373%22%20slang%3D%22en-US%22%3E%3CP%3ELooking%20at%20the%20attachment%2C%20it%20appears%20your%20data%20may%20have%20two%20numbers%20on%20the%20back%20end%20after%20a%20variable%20length%20string%20that%20can%20have%20both%20numbers%20and%20letters%20(so%20my%20suggestion%20would%20still%20leave%20a%20piece%20at%20the%20end%20that%20would%20need%20to%20be%20split).%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20that's%20the%20case%2C%20then%20let%20me%20know.%20I%20believe%20we%20can%20split%20the%20last%20piece%20by%20finding%20the%20character%20positions%20of%20the%20last%20and%20next%20to%20last%20spaces%20and%20using%20text%20functions%20to%20split%20the%20remaining%20three%20columns.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOr%2C%20are%20the%20two%20numbers%20in%20a%20row%20by%20themselves%20(alternating%20rows%20of%20long%20text%20string%20then%20a%20string%20of%20two%20numbers)%3F%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EIf%20you%20can%20share%20it%2C%20maybe%20it%20would%20help%20to%20upload%20the%20file.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1514468%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20selectively%20split%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1514468%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20everyone%20for%20your%20help%2C%20I%20got%20it%20now.%20I%20would%20have%20never%20figured%20this%20out%20on%20my%20own.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hello, noob here. I have a giant list of data that I copied from a pdf online and I need to selectively separate it into separate cells so that I can work with it. Right now it is all in one column, with around 34000 rows, so doing this one by one is impossible. The data goes like this: name (usually several words), identification and reference numbers (usually starting with 0), then a description, which can be a combination of words and numbers. See image below:

 

 

 

I need to split this data  in one line into the following: Name, then each separate number in its own sell, and then after the long number the rest in one cell. For example, 

 

BROWNLEE CHARLIE JR | 01 | 00 | 0194 | 3 | 31 | 0123000310240040000000 | LOT 6 BLK 2 AIRPORT ESTS

 

I have tried doing the text to column function using spaces but this doesn't align the data in one column. For example, with names of different lengths, I get the same reference number not aligned with the one above it (so I need to somehow insert blank cells. How do I do this? May be a tough problem but I have no idea so anything helps.

4 Replies
Highlighted

@alaskanbear52 

If in PDF data separated by columns you may try Power Query connector From PDF. If not, afraid no way if formal logic of how to separate is not defined.

Highlighted

@alaskanbear52 

 

It appears the numbers are fixed width. If that's correct, then it looks like the hurdle is splitting the name from the rest of the text string.

Say the data is in Column A (starting in cell A4).

First, find the character position of the first number. This is an array formula, so you have to hit Ctrl+Shift+Enter after keying/copying it into the formula bar.
B4 =MIN(IF(ISNUMBER(--(MID(A4,ROW(INDIRECT("1:"&LEN(A4))),1))),ROW(INDIRECT("1:"&LEN(A4))),""))

Extract the name:
C4 =TRIM(LEFT(A4,B4-1))

Extract the remaining portion of the string:
D4 =MID(A4,B4,LEN(A4))

Copy/paste special - value columns C and D. Then, it looks like you can use text to columns (fixed width) on Column D to separate the rest of the data into columns. I attached a file you can download to look at.

Highlighted

Looking at the attachment, it appears your data may have two numbers on the back end after a variable length string that can have both numbers and letters (so my suggestion would still leave a piece at the end that would need to be split).

If that's the case, then let me know. I believe we can split the last piece by finding the character positions of the last and next to last spaces and using text functions to split the remaining three columns.

 

Or, are the two numbers in a row by themselves (alternating rows of long text string then a string of two numbers)?


If you can share it, maybe it would help to upload the file.

Highlighted

Thanks everyone for your help, I got it now. I would have never figured this out on my own.