Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Naming a Sheet with cell values VBA Excel

Status
Not open for further replies.

niknik24

Vendor
Feb 16, 2007
18
GB
Hello

I am trying to create a macro that allows me to copy paste the following range ("a3:b3")
and then rename the active sheet name with the copied range

Is this possible

Thanks

Nik
 
You don't need to copy & paste.

You can use cells or range - this is an example using range

Sheets("Sheet1").Name = Range("A3:A3").Value & Range("B3:B3").Value

Assumptions.

Sheet to rename is currently called Sheet1
Cell A3 contains the first part of the new name and cell B3 contains the rest of the name


I have been known to be wrong.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top