On Jul 27, 2:34*pm, Dave Peterson wrote:
Check your other post.
On 07/27/2010 15:14, tbmarlie wrote:
I know this is a basic question, but I haven't used excel vb in years
so I'm trying to get some of the dust off.
I have the following vb code to copy a footer cell (which was used to
sum the contents of the column above it) and paste it to the 6 cells
to the right.
Range("E154").Select
* * *Selection.Copy
* * *Range("F154:L154").Select
* * *ActiveSheet.Paste
I just want to make this a relative formula.
After a few of these, I'll start to get the swing of things again.
--
Dave Peterson
Try this:
Sub Copy_To_Right()
Dim rng As Range
Set rng = Selection
rng.Copy rng.Range("B1:G1")
End Sub