Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-16-2013, 03:19 PM
paapachak paapachak is offline Changing rows into columns Windows 8 Changing rows into columns Office 2010 64bit
Novice
Changing rows into columns
 
Join Date: Dec 2013
Posts: 2
paapachak is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 12-16-2013, 03:39 PM
macropod's Avatar
macropod macropod is offline Changing rows into columns Windows 7 32bit Changing rows into columns Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #3  
Old 12-16-2013, 03:51 PM
paapachak paapachak is offline Changing rows into columns Windows 8 Changing rows into columns Office 2010 64bit
Novice
Changing rows into columns
 
Join Date: Dec 2013
Posts: 2
paapachak is on a distinguished road
Default

Hi,

Thanks for the reply, but its not a table.. the numbers are just like that in the word not as table...
Reply With Quote
  #4  
Old 12-16-2013, 03:58 PM
macropod's Avatar
macropod macropod is offline Changing rows into columns Windows 7 32bit Changing rows into columns Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #5  
Old 01-05-2014, 05:33 PM
SteveWcg SteveWcg is offline Changing rows into columns Windows 7 64bit Changing rows into columns Office 2013
Novice
 
Join Date: Jun 2013
Location: Sydney Australia
Posts: 22
SteveWcg is on a distinguished road
Default

Quote:
Originally Posted by paapachak View Post
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 ....

Could anyone please help me, how to change from above format to below format??

Thanks in advance
What are the separators in the original data?
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
Reply With Quote
  #6  
Old 01-05-2014, 06:02 PM
macropod's Avatar
macropod macropod is offline Changing rows into columns Windows 7 32bit Changing rows into columns Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #7  
Old 01-05-2014, 06:38 PM
SteveWcg SteveWcg is offline Changing rows into columns Windows 7 64bit Changing rows into columns Office 2013
Novice
 
Join Date: Jun 2013
Location: Sydney Australia
Posts: 22
SteveWcg is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
Actually, it's probably even simpler that that - use an ordinary Find/Replace with:
Find = ^w
Replace = ^p
If it's always one white space yeah but the pasted text had two white spaces.

After the poster if more familiar with Advanced Find & Replace then making it more cut down is a good idea.
Reply With Quote
  #8  
Old 01-05-2014, 09:35 PM
macropod's Avatar
macropod macropod is offline Changing rows into columns Windows 7 32bit Changing rows into columns Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by SteveWcg View Post
If it's always one white space yeah but the pasted text had two white spaces.
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]
Reply With Quote
  #9  
Old 01-06-2014, 02:44 PM
SteveWcg SteveWcg is offline Changing rows into columns Windows 7 64bit Changing rows into columns Office 2013
Novice
 
Join Date: Jun 2013
Location: Sydney Australia
Posts: 22
SteveWcg is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
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.
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.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing rows into columns how to keep rows highlighted when scrolling down and how to move columns? dylansmith Excel 3 03-21-2013 12:17 AM
Changing rows into columns 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
Changing rows into columns 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

Other Forums: Access Forums

All times are GMT -7. The time now is 11:50 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft