ridgetown_rick
Board Regular
- Joined
- Aug 28, 2002
- Messages
- 193
I have recorded the following macro to copy two numbers in columns E and F (I knew enough VB to change it to ActiveCell) and paste them (transposed) into another worksheet where a complex bunch of formulas are used, then copy the output back to the original where it is pasted in as values. What I DON'T know is how to dynamically reference to the cells that are beside E and F. Right now it just hardcodes it to G23 in the line: Range("G21").select
Can you help? Thanks.
Rick
ActiveCell.Select
Application.CutCopyMode = False
Selection.Copy
Windows("Formulae.xls").Activate
Range("C4").Select
Selection.PasteSpecial Paste:=xlAll, Operation:=xlNone, SkipBlanks:=False _
, Transpose:=True
Range("E16:F16").Select
Selection.Copy
Windows("614INVNT.xls").Activate
Range("G21").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
End Sub
Can you help? Thanks.
Rick
ActiveCell.Select
Application.CutCopyMode = False
Selection.Copy
Windows("Formulae.xls").Activate
Range("C4").Select
Selection.PasteSpecial Paste:=xlAll, Operation:=xlNone, SkipBlanks:=False _
, Transpose:=True
Range("E16:F16").Select
Selection.Copy
Windows("614INVNT.xls").Activate
Range("G21").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
End Sub