View Single Post
  #3   Report Post  
sf
 
Posts: n/a
Default

On Wed, 6 Jul 2005 21:03:18 +0200, Doug Robbins wrote:

If it's two whole columns that you have to interchange, select the second
one, then use Cut and the Select the first one and use Paste Columns.

If its just one cell, if you run the following code when the selection is in
the lefthand cell, it will make the substitution

Dim A As Range, B As Range, i As Long, j As Long, Atext As String
i = Selection.Information(wdEndOfRangeRowNumber)
j = Selection.Information(wdEndOfRangeColumnNumber)
Set A = Selection.Cells(1).Range
A.End = A.End - 1
Atext = A.Text
Set B = Selection.Tables(1).Cell(i, j + 1).Range
B.End = B.End - 1
Selection.Cells(1).Range = B.Text
Selection.Tables(1).Cell(i, j + 1).Range.Text = Atext


Holy mackeral! I'd drag and drop.