A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

tab name = cell value



 
 
Thread Tools Display Modes
  #1  
Old February 21st, 2008, 05:17 AM posted to microsoft.public.excel.worksheet.functions
jatman
external usenet poster
 
Posts: 102
Default tab name = cell value

is it possible to have a cell value equal the same as a sheet (tab) name?
just something simple as =sheet1 or something

thank you,
  #2  
Old February 21st, 2008, 09:54 AM posted to microsoft.public.excel.worksheet.functions
yshridhar
external usenet poster
 
Posts: 233
Default tab name = cell value

=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
best wishes
Sreedhar

"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

thank you,

  #3  
Old February 21st, 2008, 10:22 AM posted to microsoft.public.excel.worksheet.functions
Paul Moles
external usenet poster
 
Posts: 19
Default tab name = cell value

I don't know how, & I can't remember who to credit with the solution but
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255) is the formula
to use.
I believe the workbook has to be saved at least once for this to work.

Cheers

Paul

"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

thank you,

  #4  
Old February 21st, 2008, 12:56 PM posted to microsoft.public.excel.worksheet.functions
Max
external usenet poster
 
Posts: 8,574
Default tab name = cell value

"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
---
  #5  
Old February 21st, 2008, 02:28 PM posted to microsoft.public.excel.worksheet.functions
ryguy7272
external usenet poster
 
Posts: 1,593
Default tab name = cell value

You can do other, similar, things too:
http://www.mcgimpsey.com/excel/formu..._function.html


Regards,
Ryan--

--
RyGuy


"Max" wrote:

"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
---

  #6  
Old February 21st, 2008, 07:51 PM posted to microsoft.public.excel.worksheet.functions
Paul Moles
external usenet poster
 
Posts: 19
Default tab name = cell value

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

"Max" wrote:

"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
---

  #7  
Old February 21st, 2008, 08:04 PM posted to microsoft.public.excel.worksheet.functions
Gord Dibben
external usenet poster
 
Posts: 20,252
Default tab name = cell value

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

On Thu, 21 Feb 2008 11:51:02 -0800, Paul Moles
wrote:

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

"Max" wrote:

"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
---


  #8  
Old August 2nd, 2008, 05:37 PM posted to microsoft.public.excel.worksheet.functions
Fernando M.
external usenet poster
 
Posts: 1
Default tab name = cell value

Thanks Gordon,

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

Gracias,

Fernando

"Gord Dibben" wrote:

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

On Thu, 21 Feb 2008 11:51:02 -0800, Paul Moles
wrote:

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

"Max" wrote:

"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
---



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:49 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.