View Single Post
  #4  
Old January 29th, 2010, 05:26 AM posted to microsoft.public.word.tables
macropod[_2_]
external usenet poster
 
Posts: 2,402
Default Dividing one column into two in a six-column table

Hi Transcribe,

Yes the column would be blank. If you've only got a few maiden names to process, it wouldn't take much effort to transfer them
manually. If you got many to process, you could use the following macro:

Sub Move_Maidens()
Dim oCel As Cell
Application.ScreenUpdating = False
With Selection
If Not .Information(wdWithInTable) Then Exit Sub
For Each oCel In .Tables(1).Columns(2).Cells
With oCel.Range.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "\[[!\[\]]{1,}\]"
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
.Execute
If .Found = True Then
oCel.Next.Range.Text = .Parent.Text
.Parent.Delete
End If
End With
Next
End With
Application.ScreenUpdating = True
End Sub

Note that this macro will move any text between square brackets in the second column to the third column.

--
Cheers
macropod
[Microsoft MVP - Word]


"Transcribe" wrote in message ...
Thank you, Macropod. Your suggestion would give me the additional column, but
wouldn't it be blank? Is there an additional step I could take to make a mass
move of the data between the brackets [the maiden names] to the new column
keeping the maiden names in their original rows? I'm trying to avoid cutting
from the second column and pasting to the new third column the maiden names
from each and every line which has maiden names. Perhaps there's no easy way
to do this.


"macropod" wrote:

Hi Transcribe,

For the new column, simply position the cursor at the right-hand end to the column you need to split and use Table|Insert|Column
to
the Right. Depending on how your table is configured, Word will adjust all the column widths to accommodate the new column
without
increasing the overall table width.

--
Cheers
macropod
[Microsoft MVP - Word]


"Transcribe" wrote in message ...
I’m working with a six-column table in Word 2003. The first column has
surnames. The second column has first names for both men and women. For
women, the second column also has their maiden names between the characters
“[” and “]” if that info is known. Second column example: Mary [Smith].

Now the “powers that be” want that second column split into two columns
(becoming the second and third columns of the table but retaining all the
rest of the columns, making this then a seven-column table). The new second
column would have only the first names of all and the new third column would
have maiden names if there are maiden names. The old third column would then
become the new fourth column, etc. I found directions to split a single
column into two, but I cannot make this work for a single column within a
six-column table.

Making this a seven-column table may make this too large a table for
8-1/2-inch wide paper, but I’ll cross that bridge when I come to it! Any
suggestions would be greatly appreciated. I’m table challenged. A solution
would keep me from cutting and pasting on hundreds of pages of material.


.