Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Function that returns name og curred sheet
Does anyone know hot to make a function that returns the name of the curred
sheet as a string I would like to have something like ="You are on sheet" & sheetname() Greetings Hans |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Function that returns name og curred sheet
Hi
To get the current worksheet name try: =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255) -- Regards Frank Kabel Frankfurt, Germany hans wrote: Does anyone know hot to make a function that returns the name of the curred sheet as a string I would like to have something like ="You are on sheet" & sheetname() Greetings Hans |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Function that returns name og curred sheet
Note that this requires that the workbook has been saved at least once
(rather than being a new workbook with a default name like Book1 as an example). -- Regards, Tom Ogilvy "Frank Kabel" wrote in message ... Hi To get the current worksheet name try: =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255) -- Regards Frank Kabel Frankfurt, Germany hans wrote: Does anyone know hot to make a function that returns the name of the curred sheet as a string I would like to have something like ="You are on sheet" & sheetname() Greetings Hans |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Function that returns name og curred sheet
Hans
Programming method. 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 Gord Dibben Excel MVP On Mon, 16 Feb 2004 17:04:00 +0100, "hans" wrote: Does anyone know hot to make a function that returns the name of the curred sheet as a string I would like to have something like ="You are on sheet" & sheetname() Greetings Hans |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Function that returns name og curred sheet
Thanks for the help.
Greeetings Hans "Gord Dibben" <gorddibbATshawDOTca schreef in bericht ... Hans Programming method. 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 Gord Dibben Excel MVP On Mon, 16 Feb 2004 17:04:00 +0100, "hans" wrote: Does anyone know hot to make a function that returns the name of the curred sheet as a string I would like to have something like ="You are on sheet" & sheetname() Greetings Hans |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IF function returns function statement rather than result | Excel Worksheet Functions | |||
GETPIVOTDATA returns zero when copied to another sheet | Excel Worksheet Functions | |||
Help formula that returns a text string from another sheet | Excel Worksheet Functions | |||
Autosum returns 0 value on data sheet | Excel Worksheet Functions | |||
INT Function Returns 1 | Excel Worksheet Functions |