#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Sheet names code

Is there away to get the name of a worksheet onto the worksheet itself
in a cell?

Jonah

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 390
Default Sheet names code

In , Jonah
spake thusly:

Is there away to get the name of a worksheet onto the worksheet
itself in a cell?


With Laurent Longre's SHEETNAME function from his Morefunc
collection, there is.

http://xcell05.free.fr/

-dman-
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default Sheet names code

If the sheet has been saved before then you can use:

=MID(CELL("filename"),FIND("]",CELL("filename"))+1,255)

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"Jonah" wrote in message
...
Is there away to get the name of a worksheet onto the worksheet itself
in a cell?

Jonah



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 82
Default Sheet names code

A formula like:

=CELL("filename")

will return the filename, including the full directory path.

If you only want the filename, excluding the directory path try something
like

=MID(CELL("filename"),LEN(INFO("directory"))+1,99)

HTH,

TK

"Jonah" wrote:

Is there away to get the name of a worksheet onto the worksheet itself
in a cell?

Jonah


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Sheet names code

See http://www.xldynamic.com/source/xld.xlFAQ0002.html

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Jonah" wrote in message
...
Is there away to get the name of a worksheet onto the worksheet itself
in a cell?

Jonah





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,073
Default Sheet names code


Jonah wrote:

Is there away to get the name of a worksheet onto the worksheet itself
in a cell?

Jonah


=RIGHT(CELL("filename"),LEN(CELL("filename"))-FIND("]",CELL("filename")))

Returns an empty string until workbook is saved.

Ken Johnson

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Sheet names code

it's best to include a reference to that worksheet that you want:

=cell("filename",a1)
(any cell will do)

If you don't include a cell reference, then this formula will evaluate to the
name of the sheet that's active when excel calculates. It may not even be in
the same workbook!

T Kirtley wrote:

A formula like:

=CELL("filename")

will return the filename, including the full directory path.

If you only want the filename, excluding the directory path try something
like

=MID(CELL("filename"),LEN(INFO("directory"))+1,99)

HTH,

TK

"Jonah" wrote:

Is there away to get the name of a worksheet onto the worksheet itself
in a cell?

Jonah



--

Dave Peterson
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default Sheet names code

You should add a cell reference (it doesn't matter what cell) to the CELL
functions. E.g.,

CELL("filename",A1)

Without the reference, the value returned by CELL is the workbook/worksheet
that is active when the cell containing the formula is calculated. If a
sheet other than the sheet containing the formula is active, you'll get the
wrong result.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com
(email address is on the web site)


"Ken Johnson" wrote in message
ups.com...

Jonah wrote:

Is there away to get the name of a worksheet onto the worksheet itself
in a cell?

Jonah


=RIGHT(CELL("filename"),LEN(CELL("filename"))-FIND("]",CELL("filename")))

Returns an empty string until workbook is saved.

Ken Johnson



  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,073
Default Sheet names code


Chip Pearson wrote:
You should add a cell reference (it doesn't matter what cell) to the CELL
functions. E.g.,

CELL("filename",A1)

Without the reference, the value returned by CELL is the workbook/worksheet
that is active when the cell containing the formula is calculated. If a
sheet other than the sheet containing the formula is active, you'll get the
wrong result.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com
(email address is on the web site)


"Ken Johnson" wrote in message
ups.com...


Thanks Chip

Ken Johnson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Named Ranges Epinn Excel Worksheet Functions 23 October 16th 06 07:27 AM
Text formatting Kace Excel Worksheet Functions 1 September 18th 06 08:28 PM
VB code to copy sheet format to another sheet ASU Excel Discussion (Misc queries) 12 August 10th 06 02:37 AM
Macro for changing text to Proper Case JPriest Excel Worksheet Functions 3 August 8th 05 09:31 PM
Using other workbooks.. DavidMunday Excel Worksheet Functions 2 July 1st 05 07:35 AM


All times are GMT +1. The time now is 02:46 PM.

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

About Us

"It's about Microsoft Excel"