NotePad to Excel without delimitator??

Mikeg262

New Member
Joined
Jan 27, 2015
Messages
7
Hey All,

I have a data set that is about 5k lines (in Notepad), it is in the format (shown below) where each row contains the line of data I want to put into 4 or 5 columns. The data does not have a delimitator (as I understand it anyway; I am not a pro at this). I have tried importing it with different delimitator settings, copying the data into a single column in Excel and using different combos of OFFSET. ROW and COLUMN, even considered using IFs, ANDs and such, but that became complicated quickly. I tried using the Query function in excel, but never used it before and wasn't sure what I was doing, but I thought if I could transpose each line to a column I could write a pretty simple formula to combine the similar columns, but it would not separate the data neatly. of course searched the web and forums for solutions but did not find any good ones. All of this did not solve the issues obviously. My final thought was to type a delimitator like ";" after each line, but I don't know if that'll work and it will take hours. So I would be happy to have a little insight.

Data format in Notepad:
(Line 1) From: XXXXXXXXXX
(Line 2) Timestamp: mm/dd/yyyy hr:mm:sc PM(UTC+0)
(Line 3) Source App: Nameof App
(Line 4) Body:
(Line 5) XXXXXXXXXXXXXXXXXXXXXXX
(Line 6) -------------------------------------
(Line 7) From: XXXXXXXXXX
(Line 8) Timestamp: mm/dd/yyyy hr:mm:sc PM(UTC+0)
(Line 9) Source App: Nameof App
(Line 10) Body:
(Line 11) XXXXXXXXXXXXXXXXXXXXXXX
(Line 12) -------------------------------------

This then repeats with for the rest of the document. Each entry is separated by --------
The line numbers are not part of the document and the XXXXX and names vary in length, but are all contained to one line.
The body and message are two separate lines, if they end up as separate columns I can easily fix that later.
I don't care about making the dashes into columns, but I can easily delete that later.

I would like to say thank you in advance. I really appreciate all the help!
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
This process will be a shot in the dark, but I think it might work...may need some tweaking.

1) open the file in Excel...all will be in column A.
2) In column B, append each line with a comma using a formula such as =A1 & ","
3) Copy Column B and "paste values" back in column B. This will essentially get rid of the formulas.
4) Delete column A.
5) Do a find/replace in the entire document to replace "----------------------," with a line feed, ie =char(10)
6) Save as a text file.
7) Import into Excel as a comma delimited text file.
 
Upvote 0
This process will be a shot in the dark, but I think it might work...may need some tweaking.

1) open the file in Excel...all will be in column A.
2) In column B, append each line with a comma using a formula such as =A1 & ","
3) Copy Column B and "paste values" back in column B. This will essentially get rid of the formulas.
4) Delete column A.
5) Do a find/replace in the entire document to replace "----------------------," with a line feed, ie =char(10)
6) Save as a text file.
7) Import into Excel as a comma delimited text file.
Ok So I did all this and I tried a few different arrangements. Now all the data is the same as above followed by a "," and I saved it as a Text (tab delimin) .txt file (also tried Formated Text (space delim) file and a Unicode text file. When I saved it, it added quotes before and after each line. I tried to import as a comma delaminated file from each of these text files and used a variety of options, but it still gives me one column. I also did a find and replace on the quotes and removed them. What I noticed in the Data Preview window of the import file is that when I select Comma as the delimiter, it creates a second column, but does not move any data into the separate column. The only option that separates the data is the Space delimiter, but this separates every word...
 
Upvote 0
Ok So I did all this and I tried a few different arrangements. Now all the data is the same as above followed by a "," and I saved it as a Text (tab delimin) .txt file (also tried Formated Text (space delim) file and a Unicode text file. When I saved it, it added quotes before and after each line. I tried to import as a comma delaminated file from each of these text files and used a variety of options, but it still gives me one column. I also did a find and replace on the quotes and removed them. What I noticed in the Data Preview window of the import file is that when I select Comma as the delimiter, it creates a second column, but does not move any data into the separate column. The only option that separates the data is the Space delimiter, but this separates every word...
I should add that selecting comma as a delimiter adds a second column to the preview window AND removes the commas from the end of the lines of text.
 
Upvote 0
Okay, I figured this one out, tried it and it works.
- You have your list of data all in column A
- in column B, number the rows starting at 0 and incrementing by 6. ie, 0,6,12,18,24...etc

Once you have that first row C-H set you can simply copy that row down until it arranges all of your data. After that you can do a copy/pastevalues to replace those formulas with actual data and then delete columns A and B and you should be set.

Cell Formulas
RangeFormula
C1:C14C1=+OFFSET(A$1,B1,0)
D1:D14D1=+OFFSET(A$1,B1+1,0)
E1:E14E1=+OFFSET(A$1,B1+2,0)
F1:F14F1=+OFFSET(A$1,B1+3,0)
G1:G14G1=+OFFSET(A$1,B1+4,0)
H1:H14H1=+OFFSET(A$1,B1+5,0)
 
Upvote 0
Solution
Okay, I figured this one out, tried it and it works.
- You have your list of data all in column A
- in column B, number the rows starting at 0 and incrementing by 6. ie, 0,6,12,18,24...etc

Once you have that first row C-H set you can simply copy that row down until it arranges all of your data. After that you can do a copy/pastevalues to replace those formulas with actual data and then delete columns A and B and you should be set.

Cell Formulas
RangeFormula
C1:C14C1=+OFFSET(A$1,B1,0)
D1:D14D1=+OFFSET(A$1,B1+1,0)
E1:E14E1=+OFFSET(A$1,B1+2,0)
F1:F14F1=+OFFSET(A$1,B1+3,0)
G1:G14G1=+OFFSET(A$1,B1+4,0)
H1:H14H1=+OFFSET(A$1,B1+5,0)
Awesome! This worked, there were some errors in the data that took me awhile to correct, mostly erroneous blank rows. But once that was all cleared up this method worked perfectly. Thank you so much!
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,633
Latest member
DougMo

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