How do I create a Range Name?

C

Curious

I want to create different ranges of cells to capture the content and
duplicate on another sheet or workbook using a macro.
 
B

Bob Phillips

Just select the range of cells, hit Ctrl-F3, and add a name.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
D

Don Guillett

or, select the cells and name in the NAME box to the left of the formula
box.
To do with a macro

sheets("yoursheet").range("a2:b5").name="newname"
 
C

Curious

Thank you for the answer. How would I change a macro that I recorded to use
a RangeName instead of the cell range? I am not that familiar with the VB
code.

Thanks
 
C

Curious

Thank you for the answer. How would I change a macro that I recorded to use
a RangeName instead of the cell range? I am not that familiar with the VB
code.
 
C

Curious

Here is the code I have now:
ub Character()
'
' Character Macro
'
' Keyboard Shortcut: Ctrl+c
'
Range("A1:C3").Select
Selection.Copy
Range("G1").Select
ActiveSheet.Paste
End Sub

How do I change this to use aRangeName "CHARACTER" instead of the current
cell range? Thank you for your help.
 
D

Don Guillett

I wouldn't use ctr+c as it is already used by excel.

Sub copyrangebyname()
Range("character").Copy Range("g1")
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

Top