PDA

View Full Version : repeating the copying of cells from one worksheet to another



JCOZ
08-17-2015, 10:37 PM
Hi, I'm trying to copy cells from a fixed location on one worksheet (where I have to manually adjust the data by Richards curves) to a variable location on another worksheet (essentially copies over the original data that I have extracted to manipulate).

In the code below I want to replace “U48:bm48” with a reference to, for example, a cell (ie a3) that will tell the function at what row no. the paste special is to occur (and always at column U (column 21)).


Sub Revised_propensity()
'
' Revised_propensity Macro
'
Range("C251:C296").Select
Selection.Copy
ActiveSheet.Next.Select
Range("U48:bm48").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
End Sub

Any suggestions? Many thanks
Julian