Don't know if Nick Hodge has already shared the relevant code with you.
The following code assumes that the PT has at least one empty column
and row surrounding it (or is at the corresponding edge of the
worksheet). In addition, there is enough space to the right of the PT
to make a copy of it.
Select any cell in the PT and run the code.
Sub Macro1()
Dim PTRange As Range, DestRng As Range, EmptyCells As Range
Set PTRange = ActiveCell.CurrentRegion
PTRange.Copy
Set DestRng = PTRange.Offset(0, PTRange.Columns.Count + 1)
DestRng.PasteSpecial _
Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
With DestRng
Set EmptyCells = Range(.Cells(2, 1), _
.Cells(.Rows.Count, .Columns.Count)) _
.SpecialCells(xlCellTypeBlanks)
End With
EmptyCells.FormulaR1C1 = "=R[-1]C"
With DestRng
.Copy
.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End With
End Sub
--
Regards,
Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions