Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: tab name = cell value

5,249 views
Skip to first unread message

Max

unread,
Feb 21, 2008, 7:56:02 AM2/21/08
to
"jatman" wrote:
> is it possible to have a cell value equal the same as a sheet (tab) name?
> just something simple as =sheet1 or something

Another technique, credits to Harlan,
which enables usage for all sheets at one go
(same proviso - book must be saved beforehand)

Click Insert > Name > Define
Put under "Names in workbook:": WSN
Put in the "Refers to:" box:
=MID(CELL("Filename",INDIRECT("A1")),FIND("]",CELL("Filename",INDIRECT("A1")))+1,32)
Click OK

The above defines WSN as a name we can use to refer to the sheetname in
formulas. It will auto-extract the sheetname implicitly.

Then test/use in any sheet, in any cell, eg: =WSN
will return the particular sheetname
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---

ryguy7272

unread,
Feb 21, 2008, 9:28:02 AM2/21/08
to
You can do other, similar, things too:
http://www.mcgimpsey.com/excel/formulae/cell_function.html


Regards,
Ryan--

--
RyGuy

Paul Moles

unread,
Feb 21, 2008, 2:51:02 PM2/21/08
to
Is it possible to include this as a function in "Personal" so that it is
available to all workbooks, perhaps with some error checking for unsaved
workbooks?

Cheers

Paul

Gord Dibben

unread,
Feb 21, 2008, 3:04:41 PM2/21/08
to
Function SheetName(Optional ByVal rng As Range) As String
Application.Volatile
If rng Is Nothing Then Set rng = Application.Caller
SheetName = rng.Parent.Name
End Function

=SheetName()

Has no arguments and doesn't care if the workbook is saved.


Gord Dibben MS Excel MVP

M.@discussions.microsoft.com Fernando M.

unread,
Aug 2, 2008, 12:37:03 PM8/2/08
to
Thanks Gordon,

this really works fine... even in a Spanish Excel

Gracias,

Fernando

0 new messages