Use a sheet name in a formula

F

FreddieP

Hi I would like a formula in a cell where I can show the sheet name.

For example

="2008 "&"Sheetname"

Anybody who knows?
 
T

Tom Hutchins

Try this...

="2008 " &
RIGHT(CELL("Filename"),LEN(CELL("Filename"))-FIND("]",CELL("Filename")))

The workbook must have been saved at least once for this to work.

Hope this helps,

Hutch
 
M

Marcelo

="2008 "&MID(CELL("filename"),FIND("]",CELL("filename"),1)+1,256)

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"FreddieP" escreveu:
 
P

Peo Sjoblom

="2008 "&MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,32)

A1 can be replaced by any cell reference even the cell that holds the
formula



--


Regards,


Peo Sjoblom
 
P

Peo Sjoblom

That is not correct, you need to include a cell reference or else it will
switch sheet names
to the active sheet once the workbook is saved again.


--


Regards,


Peo Sjoblom


Tom Hutchins said:
Try this...

="2008 " &
RIGHT(CELL("Filename"),LEN(CELL("Filename"))-FIND("]",CELL("Filename")))

The workbook must have been saved at least once for this to work.

Hope this helps,

Hutch

FreddieP said:
Hi I would like a formula in a cell where I can show the sheet name.

For example

="2008 "&"Sheetname"

Anybody who knows?
 
F

FreddieP

I dont get it to work. And also I think that this will return the name of the
file. I want it to return the name of a specific sheet within the file.

Peo, could you perhaps write the formula in Swedish which I guess you are
when I see your name :)

/Freddie

Peo Sjoblom said:
="2008 "&MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,32)

A1 can be replaced by any cell reference even the cell that holds the
formula



--


Regards,


Peo Sjoblom


FreddieP said:
Hi I would like a formula in a cell where I can show the sheet name.

For example

="2008 "&"Sheetname"

Anybody who knows?
 
P

Peo Sjoblom

I am Swedish but I don't have a Swedish Excel installed on the computer I am
at the moment,
The formula would be


="2008 "&EXTEXT(CELL("filename";A1);HITTA("]";CELL("filename";A1))+1;32)

in Swedish except that I don't remember if "filename" is changed to a
Swedish equivalent?


If you go to help and lookup the CELL function, what options are there, if
there is no "filename" replace it with
whatever the help example is using


--


Regards,


Peo Sjoblom





FreddieP said:
I dont get it to work. And also I think that this will return the name of
the
file. I want it to return the name of a specific sheet within the file.

Peo, could you perhaps write the formula in Swedish which I guess you are
when I see your name :)

/Freddie

Peo Sjoblom said:
="2008 "&MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,32)

A1 can be replaced by any cell reference even the cell that holds the
formula



--


Regards,


Peo Sjoblom


FreddieP said:
Hi I would like a formula in a cell where I can show the sheet name.

For example

="2008 "&"Sheetname"

Anybody who knows?
 
G

Gord Dibben

Freddie.

It works as Peo has written it.

I get 2008 Sheet1 when I enter the formula in any cell in Sheet1


Gord Dibben MS Excel MVP


I dont get it to work. And also I think that this will return the name of the
file. I want it to return the name of a specific sheet within the file.

Peo, could you perhaps write the formula in Swedish which I guess you are
when I see your name :)

/Freddie

Peo Sjoblom said:
="2008 "&MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,32)

A1 can be replaced by any cell reference even the cell that holds the
formula



--


Regards,


Peo Sjoblom


FreddieP said:
Hi I would like a formula in a cell where I can show the sheet name.

For example

="2008 "&"Sheetname"

Anybody who knows?
 

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