LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default what's the function to return a sheetname in a cell in Excel?

It could be if you had a UDF

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()

The workbook does not have be saved first.

But the native function Peo posted works a little faster and who would want
to know the sheetname in an unsaved file?


Gord Dibben MS Excel MVP

On Thu, 2 Oct 2008 15:14:03 -0700, judi
wrote:

I was hoping it was this, and it ain't.

=sheetname()

or

=sheet()






 
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
Automatically update SheetName in workbook sub if SheetName changes [email protected] Excel Discussion (Misc queries) 3 February 29th 08 04:33 PM
Using a cell to reference sheetname in vlookup function jnasr Excel Worksheet Functions 1 October 25th 06 05:06 PM
Excel worksheet function that will return the currency for a cell funmi_Bash Excel Worksheet Functions 2 August 15th 05 09:17 AM
Need Excel Function that will return # of char in preceding cell klafert Excel Discussion (Misc queries) 3 June 19th 05 05:44 PM
Need Excel Function that will return # of char in preceding cell klafert Excel Worksheet Functions 2 June 19th 05 04:50 PM


All times are GMT +1. The time now is 11:05 AM.

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

About Us

"It's about Microsoft Excel"