View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Roger Govier[_3_] Roger Govier[_3_] is offline
external usenet poster
 
Posts: 2,480
Default COPY FORMULA TO THE LAST CELL

Hi

Try

Sub ExtendFormulae()
Dim lr As Long

Sheets("Sheet1").Activate
lr = Cells(Rows.Count, "A").End(xlUp).Row
Range("G5:K5").Copy Range("G5").Offset(0, 0).Range("A1:A" & lr - 4)
Application.CutCopyMode = False

End Sub


--
Regards
Roger Govier

"K" wrote in message
...
I got formulas in cells "G5" , "H5" , "I5" , "J5" and "K5" and I got
data in
coloumn "A" aswell. I want Macro to copy the formulas looking at
coloumn "A" data. Like if I got data or values in coloumn "A" from
cell
"A5" to cell "A100" then Macro should copy formulas from
cells "G5" , "H5" , "I5" , "J5" to cells "G100" , "H100" , "I100" ,
"J100"
In other words Macro should always look data to last cell of coloumn
"A" and copy formulas in coloumns "G" , "H" , "I" , "J" and "K" to
same
last cell where the data ends in coloumn "A". Please If anybody can
help.