Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
Ed Sheehan Ed Sheehan is offline
external usenet poster
 
Posts: 14
Default Automated way to merge and remove hard returns in a column

I have created a table from a report. One column has many words, which wrap
into several rows during 'convert text to table,' while all the other
columns could fit on one row, as shown in Fig. A. I would like to end up
like Fig. B, but It's a real PITA to do the merges and return-removals
manually. Anyone got a solution? I'm happy to massage the data externally if
necessary.

|COLUMN1 |COLUMN2 |COLUMN3 |
|----------|------------|----------|
|Few Words |Many many wo|Few Words |
|----------|------------|----------|
| |rds are in t| |
|----------|------------|----------| Fig. A
| |his column, | |
|----------|------------|----------|
| |and they hav| |
|----------|------------|----------|
| |e hard retur| |
|----------|------------|----------|
| |ns embedded | |
|----------|------------|----------|
| |for every ro| |
|----------|------------|----------|
| |w. | |
|----------|------------|----------|

================================================== ===

|COLUMN1 |COLUMN2 |COLUMN3 |
|----------|------------|----------|
|Few Words |Many many wo|Few Words |
| |rds are in t| | Fig. B
| |his column, | |
| |and they hav| |
| |e hard retur| |
| |ns embedded | |
| |for every ro| |
| |w. | |

|----------|------------|----------|

Thanks, Ed


  #2   Report Post  
Posted to microsoft.public.word.tables
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default Automated way to merge and remove hard returns in a column

Although there may be other ways to do this, I'd still do it the way you
have been. That is, convert the text to a table, then select all the rows
in Column B that belong together and merge them. Merge the corresponding
rows in A and C as well. Then use Find and Replace (see
http://word.mvps.org/FAQs/Formatting/CleanWebText.htm) to remove the
paragraph breaks. Even using column-select, I can't see any more efficient
way to handle it.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Ed Sheehan" wrote in message
...
I have created a table from a report. One column has many words, which

wrap
into several rows during 'convert text to table,' while all the other
columns could fit on one row, as shown in Fig. A. I would like to end up
like Fig. B, but It's a real PITA to do the merges and return-removals
manually. Anyone got a solution? I'm happy to massage the data externally

if
necessary.

|COLUMN1 |COLUMN2 |COLUMN3 |
|----------|------------|----------|
|Few Words |Many many wo|Few Words |
|----------|------------|----------|
| |rds are in t| |
|----------|------------|----------| Fig. A
| |his column, | |
|----------|------------|----------|
| |and they hav| |
|----------|------------|----------|
| |e hard retur| |
|----------|------------|----------|
| |ns embedded | |
|----------|------------|----------|
| |for every ro| |
|----------|------------|----------|
| |w. | |
|----------|------------|----------|

================================================== ===

|COLUMN1 |COLUMN2 |COLUMN3 |
|----------|------------|----------|
|Few Words |Many many wo|Few Words |
| |rds are in t| | Fig. B
| |his column, | |
| |and they hav| |
| |e hard retur| |
| |ns embedded | |
| |for every ro| |
| |w. | |

|----------|------------|----------|

Thanks, Ed



  #3   Report Post  
Posted to microsoft.public.word.tables
Ed Sheehan Ed Sheehan is offline
external usenet poster
 
Posts: 14
Default Automated way to merge and remove hard returns in a column

Thanks, Suzanne. I was homing in on that as as solution as well, but there
was just too much work to it. So rather than use the built-in report
generator to produce the report, I wrote a program to print the data to the
screen in tab-delimited format with no column wrapping, then captured it.

I thought it might be safer to import to Excel first, because it's supposed
to handle columns/rows better (at least it has a better text-to-columns
filter).The w-i-d-e column went beyond 255 characters, and Excel filled
those cells with # characters. That was not a pleasant suprise.

So, in desperation I went directly into Word, thinking it would choke even
worse, and viola! It came in without a hitch. Text-to-tables formatted the
thing just as I had hoped. And it couldn't care less how much text was in a
cell! Who knew? :-)

The lesson here is: If you want columns to auto-wrap, don't bring 'em in
with hard returns. And if you want one row per logical imported row, don't
bring 'em in with hard returns. This means one has to ensure that each
imported row has columns as wide as necessary to hold the data - not always
an easy thing to accomplish.

I still think it shouldn't be too hard to create some kind of filter to
parse columns/rows to see where to wrap/break them.

Thanks again,

Ed
"Suzanne S. Barnhill" wrote in message
...
Although there may be other ways to do this, I'd still do it the way you
have been. That is, convert the text to a table, then select all the rows
in Column B that belong together and merge them. Merge the corresponding
rows in A and C as well. Then use Find and Replace (see
http://word.mvps.org/FAQs/Formatting/CleanWebText.htm) to remove the
paragraph breaks. Even using column-select, I can't see any more efficient
way to handle it.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup
so
all may benefit.

"Ed Sheehan" wrote in message
...
I have created a table from a report. One column has many words, which

wrap
into several rows during 'convert text to table,' while all the other
columns could fit on one row, as shown in Fig. A. I would like to end up
like Fig. B, but It's a real PITA to do the merges and return-removals
manually. Anyone got a solution? I'm happy to massage the data externally

if
necessary.

|COLUMN1 |COLUMN2 |COLUMN3 |
|----------|------------|----------|
|Few Words |Many many wo|Few Words |
|----------|------------|----------|
| |rds are in t| |
|----------|------------|----------| Fig. A
| |his column, | |
|----------|------------|----------|
| |and they hav| |
|----------|------------|----------|
| |e hard retur| |
|----------|------------|----------|
| |ns embedded | |
|----------|------------|----------|
| |for every ro| |
|----------|------------|----------|
| |w. | |
|----------|------------|----------|

================================================== ===

|COLUMN1 |COLUMN2 |COLUMN3 |
|----------|------------|----------|
|Few Words |Many many wo|Few Words |
| |rds are in t| | Fig. B
| |his column, | |
| |and they hav| |
| |e hard retur| |
| |ns embedded | |
| |for every ro| |
| |w. | |

|----------|------------|----------|

Thanks, Ed





  #4   Report Post  
Posted to microsoft.public.word.tables
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default Automated way to merge and remove hard returns in a column

Interesting. I obviously misinterpreted the initial problem, though.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Ed Sheehan" wrote in message
...
Thanks, Suzanne. I was homing in on that as as solution as well, but there
was just too much work to it. So rather than use the built-in report
generator to produce the report, I wrote a program to print the data to

the
screen in tab-delimited format with no column wrapping, then captured it.

I thought it might be safer to import to Excel first, because it's

supposed
to handle columns/rows better (at least it has a better text-to-columns
filter).The w-i-d-e column went beyond 255 characters, and Excel filled
those cells with # characters. That was not a pleasant suprise.

So, in desperation I went directly into Word, thinking it would choke even
worse, and viola! It came in without a hitch. Text-to-tables formatted the
thing just as I had hoped. And it couldn't care less how much text was in

a
cell! Who knew? :-)

The lesson here is: If you want columns to auto-wrap, don't bring 'em in
with hard returns. And if you want one row per logical imported row, don't
bring 'em in with hard returns. This means one has to ensure that each
imported row has columns as wide as necessary to hold the data - not

always
an easy thing to accomplish.

I still think it shouldn't be too hard to create some kind of filter to
parse columns/rows to see where to wrap/break them.

Thanks again,

Ed
"Suzanne S. Barnhill" wrote in message
...
Although there may be other ways to do this, I'd still do it the way you
have been. That is, convert the text to a table, then select all the

rows
in Column B that belong together and merge them. Merge the corresponding
rows in A and C as well. Then use Find and Replace (see
http://word.mvps.org/FAQs/Formatting/CleanWebText.htm) to remove the
paragraph breaks. Even using column-select, I can't see any more

efficient
way to handle it.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the

newsgroup
so
all may benefit.

"Ed Sheehan" wrote in message
...
I have created a table from a report. One column has many words, which

wrap
into several rows during 'convert text to table,' while all the other
columns could fit on one row, as shown in Fig. A. I would like to end

up
like Fig. B, but It's a real PITA to do the merges and return-removals
manually. Anyone got a solution? I'm happy to massage the data

externally
if
necessary.

|COLUMN1 |COLUMN2 |COLUMN3 |
|----------|------------|----------|
|Few Words |Many many wo|Few Words |
|----------|------------|----------|
| |rds are in t| |
|----------|------------|----------| Fig. A
| |his column, | |
|----------|------------|----------|
| |and they hav| |
|----------|------------|----------|
| |e hard retur| |
|----------|------------|----------|
| |ns embedded | |
|----------|------------|----------|
| |for every ro| |
|----------|------------|----------|
| |w. | |
|----------|------------|----------|

================================================== ===

|COLUMN1 |COLUMN2 |COLUMN3 |
|----------|------------|----------|
|Few Words |Many many wo|Few Words |
| |rds are in t| | Fig. B
| |his column, | |
| |and they hav| |
| |e hard retur| |
| |ns embedded | |
| |for every ro| |
| |w. | |

|----------|------------|----------|

Thanks, Ed






Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove background highlighting form merge fields DD Mailmerge 2 July 8th 06 06:18 AM
How do I remove highlighting in the merge field on a mail merge? Donnaw Mailmerge 1 February 9th 06 04:56 AM
Hard returns in an If-Then-Else statement Bryan L Mailmerge 2 November 30th 05 08:29 PM
How to remove mail merge from a new starting document? Aideesg New Users 1 September 10th 05 06:53 AM
How to remove unwanted formatting in mail merge for cells witn no Jim Mailmerge 3 March 4th 05 08:13 AM


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

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"