ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Naming Spreadsheet Tabs (https://www.excelbanter.com/excel-discussion-misc-queries/158616-naming-spreadsheet-tabs.html)

Ellen G

Naming Spreadsheet Tabs
 
Hi all you Excel gurus out there --

Is there a way to have a spreadsheet tab automatically name itself based on
a cell within the the sheet?

Thanks for your help.

Ellen

Nick Hodge[_2_]

Naming Spreadsheet Tabs
 
Ellen

Only by using code. You could use a Worksheet_Change() event, like so

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Range("A1")) Is Nothing Then
Me.Name = Target.Value
End If
End Sub

It has no checking if the name has illegal characters though, is too long
etc.

To implement in a sheet right click the tab and select view code. paste it
there and close the VBE, now if you make a change in A1 on that sheet it
will change the name of the sheet tab



--

HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
web:
www.nickhodge.co.uk
blog (non tech): www.nickhodge.co.uk/blog


"Ellen G" wrote in message
...
Hi all you Excel gurus out there --

Is there a way to have a spreadsheet tab automatically name itself based
on
a cell within the the sheet?

Thanks for your help.

Ellen



Don Guillett

Naming Spreadsheet Tabs
 
you would need a macro to do that either in a worksheet_change event or a
macro
If a date you will have to use an acceptable format.

activesheet.name=range("a1").value

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Ellen G" wrote in message
...
Hi all you Excel gurus out there --

Is there a way to have a spreadsheet tab automatically name itself based
on
a cell within the the sheet?

Thanks for your help.

Ellen



challa prabhu

Naming Spreadsheet Tabs
 
No. You can only rename the Worksheet tab by double-clicking. However, if you
are familiar with the VBA programming buit into Microsoft Excel, then you
could write few lines of code for that behaviour.

Challa Prabhu

"Ellen G" wrote:

Hi all you Excel gurus out there --

Is there a way to have a spreadsheet tab automatically name itself based on
a cell within the the sheet?

Thanks for your help.

Ellen



All times are GMT +1. The time now is 11:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com