Hello,
I am trying to create a Macro that sizes itself up using the adjacent column and the paste it. Simply to use it for a Pivot table for example, here I am adding a column called Quarter and populating it with Q1. Any ideas would be greatly appreciated!!
Sub zxxx()
Range("A1").Select
Selection.End(xlToRight).Select
ActiveCell.Offset(0, 1).Select
ActiveCell.Select
ActiveCell.FormulaR1C1 = "Quarter"
ActiveCell.Offset(0, -1).Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 1).Select
ActiveCell.Select
ActiveCell.FormulaR1C1 = "Q1"
ActiveCell.Select
Selection.Copy
Range(Selection, Selection.End(xlUp)).Select
Range("Offset(1, 0)", "Select.SpecialCells(xlCellTypeLastCell)").Select
ActiveSheet.Paste
End Sub
Configuration: Windows Vista Firefox 3.0.5
Hi Guys, I cracked it !!
|

