Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Tab Names
Hi,
Is it possible to have Excel populate a cell (for example A1) with the name of that worksheet tab? This could then be used across the rest of the book. Many thanks |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Tab Names
See http://www.xldynamic.com/source/xld.xlFAQ0002.html
-- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Andy the Yeti" wrote in message ... Hi, Is it possible to have Excel populate a cell (for example A1) with the name of that worksheet tab? This could then be used across the rest of the book. Many thanks |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Tab Names
Hi Andy,
There may be a much easier way todo this, but you can paste the below into a module: Public Function tab_name() tab_name = ActiveSheet.Name End Function then in A1 enter = tab_name() This will return the tab name into call A1 but if you make a change to the tabs name, you will have to re-enter the formula as it won't autocalc. Thanks, Simon Andy the Yeti wrote: Hi, Is it possible to have Excel populate a cell (for example A1) with the name of that worksheet tab? This could then be used across the rest of the book. Many thanks -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...excel/200610/1 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Tab Names
Thank guys both great!
"smw226 via OfficeKB.com" wrote: Hi Andy, There may be a much easier way todo this, but you can paste the below into a module: Public Function tab_name() tab_name = ActiveSheet.Name End Function then in A1 enter = tab_name() This will return the tab name into call A1 but if you make a change to the tabs name, you will have to re-enter the formula as it won't autocalc. Thanks, Simon Andy the Yeti wrote: Hi, Is it possible to have Excel populate a cell (for example A1) with the name of that worksheet tab? This could then be used across the rest of the book. Many thanks -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...excel/200610/1 |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Tab Names
I think I'd use:
Option Explicit Public Function tab_name() tab_name = Application.Caller.Parent.Name End Function If I were using the UDF. Activesheet.name will be the name of the activesheet--not always the sheet containing the formula. "smw226 via OfficeKB.com" wrote: Hi Andy, There may be a much easier way todo this, but you can paste the below into a module: Public Function tab_name() tab_name = ActiveSheet.Name End Function then in A1 enter = tab_name() This will return the tab name into call A1 but if you make a change to the tabs name, you will have to re-enter the formula as it won't autocalc. Thanks, Simon Andy the Yeti wrote: Hi, Is it possible to have Excel populate a cell (for example A1) with the name of that worksheet tab? This could then be used across the rest of the book. Many thanks -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...excel/200610/1 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating Names Baffling Problem | Excel Discussion (Misc queries) | |||
Duplicate Range Names by worksheet | Excel Discussion (Misc queries) | |||
Convert Local Names to Global Names | Excel Worksheet Functions | |||
sorting names alphabetically when names may start with numbers | Excel Discussion (Misc queries) | |||
How can I find the common names in two columns of names? | Excel Discussion (Misc queries) |