Worksheet name

L

Luc

Hi all,

I know that you can put the name of the worksheet by putting &[tab] in the
header, but is it possible to put the worksheet name in cell A1 of every
worksheet? i've tried simply copying &[tab] and variants thereof, but no
luck.

Thks for any help!

Luc
 
F

Frank Kabel

Hi Luc
try one of the following formulas (note: the workbook has to be save
before)
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))
 
L

Luc

thks frank..

i've put in the following formula

=RIGHT(CELL("DB Tables.xls",A1),LEN(CELL("DB
Tables.xls",A1))-FIND("]",CELL("DB Tables.xls",A1),1))

but it comes back with !VALUE#

any ideas? the worksheet name is Company.

Luc


Frank Kabel said:
Hi Luc
try one of the following formulas (note: the workbook has to be save
before)
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))


--
Regards
Frank Kabel
Frankfurt, Germany

Hi all,

I know that you can put the name of the worksheet by putting &[tab]
in the header, but is it possible to put the worksheet name in cell
A1 of every worksheet? i've tried simply copying &[tab] and variants
thereof, but no luck.

Thks for any help!

Luc
 
F

Frank Kabel

Hi
just leave the word 'filename' in the formula. Do NOT replace it with
your actual filename. Just paste the formulas as I have posted them

--
Regards
Frank Kabel
Frankfurt, Germany

thks frank..

i've put in the following formula

=RIGHT(CELL("DB Tables.xls",A1),LEN(CELL("DB
Tables.xls",A1))-FIND("]",CELL("DB Tables.xls",A1),1))

but it comes back with !VALUE#

any ideas? the worksheet name is Company.

Luc


Frank Kabel said:
Hi Luc
try one of the following formulas (note: the workbook has to be save
before)
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))


--
Regards
Frank Kabel
Frankfurt, Germany

Hi all,

I know that you can put the name of the worksheet by putting &[tab]
in the header, but is it possible to put the worksheet name in cell
A1 of every worksheet? i've tried simply copying &[tab] and
variants thereof, but no luck.

Thks for any help!

Luc
 
L

Luc

excellent!

thanks a lot.

Luc


Frank Kabel said:
Hi
just leave the word 'filename' in the formula. Do NOT replace it with
your actual filename. Just paste the formulas as I have posted them

--
Regards
Frank Kabel
Frankfurt, Germany

thks frank..

i've put in the following formula

=RIGHT(CELL("DB Tables.xls",A1),LEN(CELL("DB
Tables.xls",A1))-FIND("]",CELL("DB Tables.xls",A1),1))

but it comes back with !VALUE#

any ideas? the worksheet name is Company.

Luc


Frank Kabel said:
Hi Luc
try one of the following formulas (note: the workbook has to be save
before)
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))


--
Regards
Frank Kabel
Frankfurt, Germany


Luc wrote:
Hi all,

I know that you can put the name of the worksheet by putting &[tab]
in the header, but is it possible to put the worksheet name in cell
A1 of every worksheet? i've tried simply copying &[tab] and
variants thereof, but no luck.

Thks for any help!

Luc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top