Justin
asked on
Macro to copy formulas to the column direcly to the right and maintain the same range.
Hi Guys, I am having a problem with this Macro which needs tweaking. It copies a column of Formulas and pastes them to the Column directly to the right. The problem is it does not keep the same range, eg, the formula =SUM(AA6:AW6") becomes =sum("AB6:AW6"). How do I maintain the same range? Here's the code. Please see attachment
Sheets("Detailed Summary").Select
Range("M6").Select
Selection.End(xlToRight).S elect
ActiveCell.Columns("A:B"). EntireColu mn.Select
ActiveCell.Activate
Selection.FillRight
ActiveCell.Columns("A:A"). EntireColu mn.Select
ActiveCell.Activate
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Detailed-Summary.xlsm
Sheets("Detailed Summary").Select
Range("M6").Select
Selection.End(xlToRight).S
ActiveCell.Columns("A:B").
ActiveCell.Activate
Selection.FillRight
ActiveCell.Columns("A:A").
ActiveCell.Activate
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Detailed-Summary.xlsm
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER