Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What I need to do is move a column of text over to another part of the file; however, each line needs to be a specific amount of spaces at the end and I cannot copy the lone column over because it wraps to the next line.

Is there anyway to do this? A very primal way to put it would be this:

A     B     C      D     E
1     2     3      4     
1     2            4     5
1     2            4     5
1     2            4     5
1     2            4     5

So I have to move the "5"'s over under the C. Each line had to be 150 characters each for it to work properly. I've tried moving it to Excel to move the column over; however, once we export it to a text file, all of the configurations get messed up and we cannot use it.

Edit Clarification from comment to an answer.

They aren't actually in formatted columns, they are in "columns" separated by spaces, so to find one column and move it is impossible. It's also not numbers, I just put those there as a mock up of the format. It's actually addresses that I need to move over. But since it's one large block of text that's spaced out to look like columns, this process is very difficult.


Further Edit

... so the file actually looks something like:

A B C D E
1 28 314 404 
17 27 4 52
12345 256 42 5
128 2 4095 512
1 221 456789 5773
share|improve this question
    
Why, what doesn't work with the Excel way? You most certainly can import the data and then export it and for example replace the tab stops with spaces. The missing spaces to reach 150 characters can be appended with some small scripts (Perl, Ruby, somebody will cook that up on Stackoverflow, I'm sure) –  slhck Feb 28 '11 at 21:00
    
@Agains: I’m still not clear what you mean. I edited your question; please either confirm that my edit is representative of your situation or explain how it is not. –  Scott Apr 19 '13 at 16:48
    
@Scott "AgainstClint" was last active in 2011... –  James Jenkins Apr 19 '13 at 17:27
add comment

4 Answers 4

If i remember correct you could simply press the ALT key and then select text in a "box" with the mouse, or with the arrow keys (as you like). Afterwards you could copy and paste it...

share|improve this answer
    
Well, through some work I got the information I need alone in a seperate file. However, when I go to past them into the column I need them to be in, it creates a whole new line and puts them all in the new lines instead of in the column I need them to be in. It's not a Word file, by the way. It has to be opened in Note Pad for formatting reasons. –  AgainstClint Feb 28 '11 at 21:13
    
If the line brakes make problems, just show them in word so you could mark the numbers, or cut and paste the spaces first. You will need to cut some spaces, to keep the order in your file anyway. If you put them at the end of the lines you can easily mark the numbers. –  Darokthar Feb 28 '11 at 21:28
    
I don't think I may have made myself clear on what this is. They aren't actually in formatted columns, they are in "columns" separated by spaces, so to find one column and move it is impossible. It's also not numbers, I just put those there as a mock up of the format. It's actually addresses that I need to move over. But since it's one large block of text thats spaced out to look like columns, this process is very difficult. –  AgainstClint Feb 28 '11 at 21:44
    
I also cannot put it into word because the format of text is completely off, so when I do put it into Word it makes a mass bock of 0's and other characters that cannot be formatted to anything usable. –  AgainstClint Feb 28 '11 at 21:45
    
Your problem sounds weird. If you can edit in notepad without problems word should be able to do it. For me it sounds like some kind of .csv file, which is using spaces instead of semicolons. Try to follow slhck comment and import your file to excel by using using Data -> Import external Data -> Import Data -> Text files. A Dialog will pop up with questions. Set the separating character to spaces. I hope this will work. –  Darokthar Feb 28 '11 at 21:58
add comment

I'm pretty sure this is a fixed width CSV file. i.e. the padding of each column is critical to the layout for importing and exporting. Although Excel can load this type of file in it cannot export it back out in the same format.

I have a tool called CSV Easy that might help. So load it into Excel, sort it out, export it as a csv, load into CSV Easy and save as fixed width.

A trial version is available at csveasy.com

Hope that helps.

share|improve this answer
add comment

If this is a plain text file (I'm confused by the Excel and Word tags), you could just use EditPlus, alt-C allows column selection.

share|improve this answer
add comment

In the comment AgainstClint Feb 28 '11 at 21: the question is clarified.

After import to Excel, use "Fixed Width" Delimitation

Data > text to Columns > Fixed width

Put your breaks at 150, this will give you seperate columns for each span 150 characters or spaces. After this you will be able to copy and paste from one excel column to the other.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.