Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dab dab is offline
external usenet poster
 
Posts: 2
Default Moving Parsed Text from Rows to Columns

I have thousands of rows of parsed text in single rows. What I have
been asked to do is now take part of each row (starting at column F)
and data in each of the next cells (the number of cells varies from row
to row) and copy if down into inserrted rows.

So instead of

Person1 Name Date Comment1 Comment2 Comment3 Comment4
Person2 Name Date Comment2 Comment2 Comment3
(the number of columns varies one I get to the first comment column)


They want it to look like this:

Person1 Name Date Comment1
Person1 Name Date Comment2
Person1 Name Date Comment3
Person1 Name Date Comment4
Person2 Name Date Comment1
Person2 Name Date Comment2
Person2 Name Date Comment3
etc...

Any ideas? I have thousands of rows already filled in as in the example
at the top.

Any macro recommendations would be greatefully appreciated.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Moving Parsed Text from Rows to Columns

dab,
Could you use an SQL solution with a UNION of SELECT queries ?
e.g. SELECT PName, Date, Comment1 FROM MyTable WHERE IsNull(Comment1)=False
UNION
SELECT PName, Date, Comment2 FROM MyTable WHERE IsNull(Comment1)=False
etc..

NickHK

"dab" wrote in message
oups.com...
I have thousands of rows of parsed text in single rows. What I have
been asked to do is now take part of each row (starting at column F)
and data in each of the next cells (the number of cells varies from row
to row) and copy if down into inserrted rows.

So instead of

Person1 Name Date Comment1 Comment2 Comment3 Comment4
Person2 Name Date Comment2 Comment2 Comment3
(the number of columns varies one I get to the first comment column)


They want it to look like this:

Person1 Name Date Comment1
Person1 Name Date Comment2
Person1 Name Date Comment3
Person1 Name Date Comment4
Person2 Name Date Comment1
Person2 Name Date Comment2
Person2 Name Date Comment3
etc...

Any ideas? I have thousands of rows already filled in as in the example
at the top.

Any macro recommendations would be greatefully appreciated.



  #3   Report Post  
Posted to microsoft.public.excel.programming
dab dab is offline
external usenet poster
 
Posts: 2
Default Moving Parsed Text from Rows to Columns

This is a bit over my head. Can you provide me with a bit more detail
of how to implement this type of solution?

Dave B

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Moving Parsed Text from Rows to Columns

Dave,
You need to look at dataGet External DataNew Database Query, then follow
the wizard to get you data.
MS Query does not directly support UNION, but if you copy and paste
<SQL
SELECT `Sheet1$`.PersonName, `Sheet1$`.Date, `Sheet1$`.Comment1
FROM `Sheet1$` `Sheet1$`
WHERE (`Sheet1$`.Comment1 Is Not Null)
UNION
.....
</SQL
for however many Comments you have (changing Comments1 to Comments2 etc)

NickHK

"dab" wrote in message
ups.com...
This is a bit over my head. Can you provide me with a bit more detail
of how to implement this type of solution?

Dave B



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving info from rows to columns Mary Lou[_2_] Excel Worksheet Functions 2 October 28th 09 01:34 AM
moving duplicate data in rows to columns with same name Jennifer B. Excel Discussion (Misc queries) 2 June 25th 08 03:47 PM
Another question moving rows to columns fivestringfreak Excel Programming 2 December 9th 05 07:43 AM
Moving rows to columns Jan Verten Excel Discussion (Misc queries) 5 September 2nd 05 04:08 PM
Moving columns into rows jim314 Excel Discussion (Misc queries) 1 March 30th 05 10:24 PM


All times are GMT +1. The time now is 02:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"