#1
|
|||
|
|||
Changing rows into columns
Hi,
I have a huge data of below format: 1 2 3 4 5 6 7 8 9 1 8 5 6 9 7 2 3 6 5 9 I need to read the data in following format 1 2 3 4 5 6 7 8 9 1 8 5 6 9 7 2 3 6 5 9 Could anyone please help me, how to change from above format to below format?? Thanks in advance |
#2
|
||||
|
||||
This is really simple: Select the whole table and use Table Tools>Layout>Merge Cells. If you want, you can then use the Convert to Text conversion to delete the table, then Insert>Table>Convert Text to table, to recreate the table with a separate row for each item.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Hi,
Thanks for the reply, but its not a table.. the numbers are just like that in the word not as table... |
#4
|
||||
|
||||
Well, with a thread title like "Changing rows into columns" I can't imagine how anyone could be expected to know it wasn't already a table; after all, rows and columns are table elements, not part of the ordinary content of a document, which basically has only lines and paragraphs.
Given that it's just lines of text, you might start by converting it to a table, via Insert>Table>Convert Text to Table, specifying the space character as the 'Separate text at' attribute. Then follow the rest of the steps from my previous post.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
Quote:
If it's a space then ; Select what's to be modified Open Advanced Find Turn on use Wildcards In the Find What Box type ([0-9]) (Where the smiley is a space or whatever is after the number) In the replace box type ^13\1 This replaces all numbers followed by a space into the number followed by a carriage return. Optionally to save your sanity cause word regex sucks use a proper editor |
#6
|
||||
|
||||
Actually, it's probably even simpler that that - use an ordinary Find/Replace with:
Find = ^w Replace = ^p
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
|||
|
|||
Quote:
After the poster if more familiar with Advanced Find & Replace then making it more cut down is a good idea. |
#8
|
||||
|
||||
Apart from the fact the posted data has only one space between each number, the ^w Find expression treats multiple spaces, tabs, etc as a single unit.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#9
|
|||
|
|||
Ok fair cop & I learn't something. When I pasted it to test the regex I got two spaces but good to know ^w covers many.
|
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to keep rows highlighted when scrolling down and how to move columns? | dylansmith | Excel | 3 | 03-21-2013 12:17 AM |
Changing the Color on Banded Rows | ParreDL | PowerPoint | 2 | 03-20-2012 12:31 PM |
Adding columns in specific rows only | mhays | Excel | 5 | 01-17-2012 09:13 AM |
Rows to Columns | kyakobi | Excel | 5 | 12-07-2010 03:12 PM |
Conditional Formatting to Hide Rows or Columns? | sczegus | Excel | 0 | 09-26-2006 04:17 PM |