Create a Macro with Starting Cell as a Variable

  • Thread starter Thread starter Linda M.
  • Start date Start date
L

Linda M.

I want to create a macro with the starting cell as a
variable, not a fixed value.
I want the macro to:

1. Start in a cell location (this cell changes with each
run).
2. Go to a named range.
3. Copy the named range.
4. Return to the starting cell.
5. Paste the named range.

I have not been successful at making the starting cell a
variable.
 
Hi Linda

Try this to copy the range to the activecell

Range("named range").Copy ActiveCell
 
Linda said:
I want to create a macro with the starting cell as a
variable, not a fixed value.
I want the macro to:

1. Start in a cell location (this cell changes with each
run).
2. Go to a named range.
3. Copy the named range.
4. Return to the starting cell.
5. Paste the named range.

I have not been successful at making the starting cell a
variable.

Try this

Sub CopyNamedRange()
Range("RangeNameHere").Copy ActiveCell
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top