Formula

N

Nicola

Can you tell me how to reference a sheet tab name within Excel. I can't
remember what to do. Thanks
 
N

Nicola

thanks but I think my question wasn't clear enough.

I need to enter a formula that returns the name of the worksheet e.g. if the
worksheet was named June I need the formula to return the result June - hope
this makes for sense.
 
G

Gearoid

Try this -

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

(cell("filename") returns full information including path to the
current worksheet). The worksheet name is the last piece of information
in the string and just before the worksheet name appears a closed
square bracket (]). Once you find that in the string, you just need all
remaining characters in the string after the ]

Ger
 
N

Nicola

thanks but it returned #value error!

Gearoid said:
Try this -

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

(cell("filename") returns full information including path to the
current worksheet). The worksheet name is the last piece of information
in the string and just before the worksheet name appears a closed
square bracket (]). Once you find that in the string, you just need all
remaining characters in the string after the ]

Ger


thanks but I think my question wasn't clear enough.

I need to enter a formula that returns the name of the worksheet e.g. if the
worksheet was named June I need the formula to return the result June - hope
this makes for sense.
 
R

Roger Govier

Hi Nicola

The workbook needs to have been saved before this can work.

--
Regards

Roger Govier


Nicola said:
thanks but it returned #value error!

Gearoid said:
Try this -

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

(cell("filename") returns full information including path to the
current worksheet). The worksheet name is the last piece of
information
in the string and just before the worksheet name appears a closed
square bracket (]). Once you find that in the string, you just need
all
remaining characters in the string after the ]

Ger


thanks but I think my question wasn't clear enough.

I need to enter a formula that returns the name of the worksheet
e.g. if the
worksheet was named June I need the formula to return the result
June - hope
this makes for sense.

:

!
sheet3!a1

--
Don Guillett
SalesAid Software
[email protected]
Can you tell me how to reference a sheet tab name within Excel.
I can't
remember what to do. Thanks
 
M

Mark0

I was looking for this answer also (great minds think alike), but how would
you adjust this to get the tab name of ANOTHER tab in ANOTHER file..?

Thanks,
-Mark

Roger Govier said:
Hi Nicola

The workbook needs to have been saved before this can work.

--
Regards

Roger Govier


Nicola said:
thanks but it returned #value error!

Gearoid said:
Try this -

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

(cell("filename") returns full information including path to the
current worksheet). The worksheet name is the last piece of
information
in the string and just before the worksheet name appears a closed
square bracket (]). Once you find that in the string, you just need
all
remaining characters in the string after the ]

Ger



Nicola wrote:
thanks but I think my question wasn't clear enough.

I need to enter a formula that returns the name of the worksheet
e.g. if the
worksheet was named June I need the formula to return the result
June - hope
this makes for sense.

:

!
sheet3!a1

--
Don Guillett
SalesAid Software
[email protected]
Can you tell me how to reference a sheet tab name within Excel.
I can't
remember what to do. Thanks
 
Top