Share via

Copy/Paste range to active cell

Anonymous
2013-10-25T20:02:43+00:00

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

Microsoft 365 and Office | Excel | For home | Windows

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.

0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2013-10-25T20:41:58+00:00

Does this do what you want?

Sub CopyRange()

    Range("MyRange").Copy Destination:=ActiveCell

End Sub

where MyRange is the named range.

Was this answer helpful?

8 people found this answer helpful.
0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Anonymous
    2013-10-28T20:43:04+00:00

    Thanks for the reply, this is great : )

    Was this answer helpful?

    0 comments No comments
  2. HansV 462.6K Reputation points
    2013-10-25T21:41:00+00:00

    Try

    ActiveCell.FormulaR1C1 = "=RC[-1]/R[-3]C[-1]"

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2013-10-25T21:37:01+00:00

    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)

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2013-10-25T20:59:23+00:00

    Thanks, Hans; I wrote line after line trying to get this simple result. Thanks Again!

    Doug

    Was this answer helpful?

    0 comments No comments