including named range code

Forum home » Delegate support and help forum » Microsoft VBA Training and help » Including a named Range in the code

Including a named Range in the code

resolvedResolved · Medium Priority · Version 2007

Rodolphe has attended:
Excel VBA Intro Intermediate course

Including a named Range in the code

Hi, how would I include a named range in vba code? Thanks

RE: Including a named Range in the code

Hello Rodolphe,

You can name a range in code as follows:
range("A1:B5").Name = "Name goes here"

and you can refer to these range names in code as follows:
Range("name goes here")

I hope this resolves your question. If it has, please mark this question as resolved.

If you require further assistance, please reply to this post. Or perhaps you have another Microsoft Office question?

Have a great day.

Microsoft Office Specialist Trainer


Training courses


Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


VBA tip:

Add A New Sheet at the end of the Workbook

To add a new sheet at the end of the workbook you need to count the sheets in the workbook using:


Then use this value as the rank of the sheet after which you want to add the new sheet:

Sheets.Add After:=Sheets(Sheets.Count)

View all VBA hints and tips

Server loaded in 0.11 secs.