Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2006

Tip: Looking for answers? Try searching our database.

Moving Parsed Text from Rows to Columns

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dab - 24 Jan 2006 06:49 GMT
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.
NickHK - 24 Jan 2006 06:55 GMT
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

> 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)
[quoted text clipped - 22 lines]
>
> Any macro recommendations would be greatefully appreciated.
dab - 24 Jan 2006 16:43 GMT
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
NickHK - 25 Jan 2006 02:15 GMT
Dave,
You need to look at data>Get External Data>New 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

> 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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.