A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Does this do what you want?
Sub CopyRange()
Range("MyRange").Copy Destination:=ActiveCell
End Sub
where MyRange is the named range.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am trying to craft a Macro that will save the location of the Active cell, and then copy a named range, and then paste that range starting at the saved location of the Active cell. Is this possible?
I want to click a cell, run the Macro, and have the range selected and copied by the Macro pasted to this cell.
Thx! Doug
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
Does this do what you want?
Sub CopyRange()
Range("MyRange").Copy Destination:=ActiveCell
End Sub
where MyRange is the named range.
Thanks for the reply, this is great : )
Try
ActiveCell.FormulaR1C1 = "=RC[-1]/R[-3]C[-1]"
I have a problem geting a Formula into an active cell based on the location of other cells. I tried to use ActiveCell offsets as the locations, but I can't figure out what's wrong:
ActiveCell.Formula = "=" & ActiveCell.Offset(0, -1) & "/" & ActiveCell.Offset(-3, -1)
-so that the new formula in the cell will be =Cell1/Cell2 (ie: =G6/G2)
Thanks, Hans; I wrote line after line trying to get this simple result. Thanks Again!
Doug