Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 40
Default Function that returns worksheet name?

Is there an Excel function that returns the name of the worksheet that
contains this formula?

I thought it might be part of cell("address"), which I could parse.
But that seems to be true only if the cell is in another worksheet.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Function that returns worksheet name?

How about a single line UDF:

Function wsheetname()
wsheetname = Application.Caller.Parent.Name
End Function
--
Gary's Student


" wrote:

Is there an Excel function that returns the name of the worksheet that
contains this formula?

I thought it might be part of cell("address"), which I could parse.
But that seems to be true only if the cell is in another worksheet.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 40
Default Function that returns worksheet name?

JE McGimpsey wrote:
See http://www.mcgimpsey.com/excel/formu..._function.html


Thanks! Funny, I was gonna try cell("filename"), but I let "logic" get
the better of me ("nah, filename has nothing to do with worksheet name,
which, after all, is just an object within the file"). I need to
remind myself to "throw caution to the wind" ;-).

That does require that I save the workbook first. But I can live with
that. Thanks again.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Function that returns worksheet name?


Sub sheetname()
Range("d1").Value = Application.ActiveSheet.Name
End Sub

Vaya con Dios,
Chuck, CABGx3




" wrote:

Is there an Excel function that returns the name of the worksheet that
contains this formula?

I thought it might be part of cell("address"), which I could parse.
But that seems to be true only if the cell is in another worksheet.


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
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
Offset function referencing worksheet Jeff Excel Discussion (Misc queries) 1 September 11th 05 07:01 PM
Function that Returns Worksheet Name Moset Excel Discussion (Misc queries) 3 July 12th 05 04:07 PM
Worksheet Function - Find? DAA Excel Worksheet Functions 2 February 24th 05 04:15 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 10:57 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"