ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Get tab name formula (https://www.excelbanter.com/excel-worksheet-functions/54383-get-tab-name-formula.html)

Daniel Bonallack

Get tab name formula
 
I pulled this formula from the web somewhere - it returns the tab name
=MID(CELL("filename"), FIND("]",CELL("filename"))+1,
LEN(CELL("filename"))-FIND("]", CELL("filename")))

But if I copy it to various sheets, F9 does not recalculate it correctly. I
actually have to go to each sheet and do Shift+F9 or F9 to make it display
the right name. Even if my workbook is set to Automatic Calculation, this
cell will not update until I go to that tab and F9 it.

Any advice?



Peo Sjoblom

Get tab name formula
 
You need to reference a cell (anyone will do even the cell the formula is
in)

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

it can be simplied since a sheet name only can have a certain number of
characters

--

Regards,

Peo Sjoblom

"Daniel Bonallack" wrote in
message ...
I pulled this formula from the web somewhere - it returns the tab name
=MID(CELL("filename"), FIND("]",CELL("filename"))+1,
LEN(CELL("filename"))-FIND("]", CELL("filename")))

But if I copy it to various sheets, F9 does not recalculate it correctly.

I
actually have to go to each sheet and do Shift+F9 or F9 to make it display
the right name. Even if my workbook is set to Automatic Calculation, this
cell will not update until I go to that tab and F9 it.

Any advice?





Daniel Bonallack

Get tab name formula
 
Thanks Peo, but I don't quite understand (sorry!).

When I copy this formula into any cell, including A1, it just returns a
#VALUE! error. I'm missing something, right?

Daniel


"Peo Sjoblom" wrote:

You need to reference a cell (anyone will do even the cell the formula is
in)

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

it can be simplied since a sheet name only can have a certain number of
characters

--

Regards,

Peo Sjoblom

"Daniel Bonallack" wrote in
message ...
I pulled this formula from the web somewhere - it returns the tab name
=MID(CELL("filename"), FIND("]",CELL("filename"))+1,
LEN(CELL("filename"))-FIND("]", CELL("filename")))

But if I copy it to various sheets, F9 does not recalculate it correctly.

I
actually have to go to each sheet and do Shift+F9 or F9 to make it display
the right name. Even if my workbook is set to Automatic Calculation, this
cell will not update until I go to that tab and F9 it.

Any advice?






Daniel Bonallack

Get tab name formula
 
Sorry, my fault, I didn't save the file. now it works.
Thanks Peo.


"Peo Sjoblom" wrote:

You need to reference a cell (anyone will do even the cell the formula is
in)

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

it can be simplied since a sheet name only can have a certain number of
characters

--

Regards,

Peo Sjoblom

"Daniel Bonallack" wrote in
message ...
I pulled this formula from the web somewhere - it returns the tab name
=MID(CELL("filename"), FIND("]",CELL("filename"))+1,
LEN(CELL("filename"))-FIND("]", CELL("filename")))

But if I copy it to various sheets, F9 does not recalculate it correctly.

I
actually have to go to each sheet and do Shift+F9 or F9 to make it display
the right name. Even if my workbook is set to Automatic Calculation, this
cell will not update until I go to that tab and F9 it.

Any advice?







All times are GMT +1. The time now is 12:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com