name of sheet

H

Hans

Just curious...is there a formula that will give the name
of a sheet? Im using Excel 2000.

hans
 
F

Frank Kabel

Hi Hans
try one of the following formulas (note: the workbook has
to be save
before). Just use the formulas as they are shown (don't
replace
'filename' with anything)

File path and file name:
=CELL("filename",A1)

File path only
=LEFT(CELL("filename",A1),FIND("[",CELL("filename",A1),1)-
1)

File name only
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)
+1,FIND("]",CEL
L("filename",A1),1)-FIND("[",CELL("filename",A1),1)-1)

The sheet name
=RIGHT(CELL("filename",A1),LEN(CELL("filename",A1))-FIND
("]",CELL("file
name",A1),1))
 
H

Hans

hello frank

a bit complicated, but it works. Thanks.
Hans
-----Original Message-----
Hi Hans
try one of the following formulas (note: the workbook has
to be save
before). Just use the formulas as they are shown (don't
replace
'filename' with anything)

File path and file name:
=CELL("filename",A1)

File path only
=LEFT(CELL("filename",A1),FIND("[",CELL("filename",A1),1)-
1)

File name only
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)
+1,FIND("]",CEL
L("filename",A1),1)-FIND("[",CELL("filename",A1),1)-1)

The sheet name
=RIGHT(CELL("filename",A1),LEN(CELL("filename",A1))-FIND
("]",CELL("file
name",A1),1))
-----Original Message-----
Just curious...is there a formula that will give the name
of a sheet? Im using Excel 2000.

hans
.
.
 
F

Frank Kabel

Hi
for a simpler solution you'll need VBA. Try the following
user defined function
Public Function sheetname(rng as range)
application.volatile
sheetname=rng.parent.name
end function

Now use this function on your worksheet like
=SHEETNAME(A1)
-----Original Message-----
hello frank

a bit complicated, but it works. Thanks.
Hans
-----Original Message-----
Hi Hans
try one of the following formulas (note: the workbook has
to be save
before). Just use the formulas as they are shown (don't
replace
'filename' with anything)

File path and file name:
=CELL("filename",A1)

File path only
=LEFT(CELL("filename",A1),FIND("[",CELL ("filename",A1),1)-
1)

File name only
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)
+1,FIND("]",CEL
L("filename",A1),1)-FIND("[",CELL("filename",A1),1)-1)

The sheet name
=RIGHT(CELL("filename",A1),LEN(CELL("filename",A1))-FIND
("]",CELL("file
name",A1),1))
-----Original Message-----
Just curious...is there a formula that will give the name
of a sheet? Im using Excel 2000.

hans
.
.
.
 
Top