=MID(CELL("filename",A1), FIND("]", CELL("filename", A1))+ 1, 255)
Try this
> I would like to copy the sheet name into a cell in the same sheet in a way
> that if the sheet name is changed the content of the cell is changed too.
> Is there a function to do this?
>
> Thank you
ronoee - 27 Jan 2007 15:16 GMT
Hello Mike
I tried out your proposal: =MID(CELL("filename",A1), FIND("]",
CELL("filename", A1))+ 1, 255)
I saved the file and changed filename in formula to actual filename.
I got failure in formula and tried with changing “,” with “;” and formula
was accepted, but I only received #NAVN? (Danish version) in English #NAME?
returned in cell.
Somehow I don’t seem to understand the syntax for the formula.
If you cold help me out further I will appreciate it.
"Mike" skrev:
> =MID(CELL("filename",A1), FIND("]", CELL("filename", A1))+ 1, 255)
>
[quoted text clipped - 5 lines]
> >
> > Thank you
George Gee - 27 Jan 2007 15:33 GMT
Just copy & paste the formula into any cell.
Do not change anything!
George Gee
> Hello Mike
>
[quoted text clipped - 24 lines]
>> >
>> > Thank you
ronoee - 27 Jan 2007 16:05 GMT
Hello Greorge Gee
"George Gee" skrev:
> Just copy & paste the formula into any cell.
> Do not change anything!
[quoted text clipped - 29 lines]
> >> >
> >> > Thank you
ronoee - 27 Jan 2007 16:06 GMT
Hello Géorge Gee
I started up with this, but it only shows the same text as it is pasted.
If I paste it in formula line I get a error message.
"George Gee" skrev:
> Just copy & paste the formula into any cell.
> Do not change anything!
[quoted text clipped - 29 lines]
> >> >
> >> > Thank you
ronoee - 27 Jan 2007 16:53 GMT
Hello George
I got a Danish version and I tried to modify syntax further and now I works
Danish syntax should bee: =MIDT(CELLE("filename";A1); FIND("]";
CELLE("filename"; A1))+ 1; 255)
Thank you for helping.
"George Gee" skrev:
> Just copy & paste the formula into any cell.
> Do not change anything!
[quoted text clipped - 29 lines]
> >> >
> >> > Thank you
Dave Peterson - 27 Jan 2007 15:35 GMT
Try it without changing those "filename"'s.
Leave them As-Is.
> Hello Mike
>
[quoted text clipped - 21 lines]
> > >
> > > Thank you

Signature
Dave Peterson
ronoee - 27 Jan 2007 16:07 GMT
Hello Dave
I started up with this, but it only shows the same text as it is pasted.
If I paste it in formula line I get a error message.
"Dave Peterson" skrev:
> Try it without changing those "filename"'s.
>
[quoted text clipped - 25 lines]
> > > >
> > > > Thank you
Dave Peterson - 27 Jan 2007 16:38 GMT
Make sure that the cell is formated as General (or anything but Text). Then
paste that formula directly into the formula bar.
And make sure you don't have any leading spaces before that initial equal sign.
And this formula will return an error if the workbook isn't saved.
> Hello Dave
>
[quoted text clipped - 36 lines]
> >
> > Dave Peterson

Signature
Dave Peterson
ronoee - 27 Jan 2007 17:01 GMT
Hello Dave
I got a Danish version and I tried to modify syntax further and now I works
Danish syntax should bee: =MIDT(CELLE("filename";A1); FIND("]";
CELLE("filename"; A1))+ 1; 255)
"Dave Peterson" skrev:
> Make sure that the cell is formated as General (or anything but Text). Then
> paste that formula directly into the formula bar.
[quoted text clipped - 43 lines]
> > >
> > > Dave Peterson
ronoee - 27 Jan 2007 16:53 GMT
Hello Dave
I got a Danish version and I tried to modify syntax further and now I works
Danish syntax should bee: =MIDT(CELLE("filename";A1); FIND("]";
CELLE("filename"; A1))+ 1; 255)
Thank you for helping.
"Dave Peterson" skrev:
> Try it without changing those "filename"'s.
>
[quoted text clipped - 25 lines]
> > > >
> > > > Thank you
Try this technique from a post by Harlan ..
First, save the book (this is a pre-requisite)
Click Insert > Name > Define
Put under "Names in workbook:": WSN
Put in the "Refers to:" box:
=MID(CELL("Filename",INDIRECT("A1")),FIND("]",CELL("Filename",INDIRECT("A1")))+1,32)
Click OK
The above defines WSN as a name we can use to refer to the sheetname in
formulas. It will auto-extract the sheetname implicitly.
Test it out. In any sheet in the book, in any cell,
just enter: =WSN to return the sheetname in the cell.

Signature
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
> I would like to copy the sheet name into a cell in the same sheet in a way
> that if the sheet name is changed the content of the cell is changed too.
> Is there a function to do this?
>
> Thank you
ronoee - 27 Jan 2007 15:21 GMT
Hello Max
I tried out your proposal:
=MID(CELL("Filename",INDIRECT("A1")),FIND("]",CELL("Filename",INDIRECT("A1")))+1,32)
In the function Insert > Name > Define as you described.
I saved the file and changed filename in formula to actual filename.
I got failure in formula and tried with changing “,” with “;” and formula
was accepted, but I only received #NAVN? (Danish version) in English #NAME?
returned in cell.
Somehow I don’t seem to understand the syntax for the formula.
If you cold help me out further I will appreciate it.
"Max" skrev:
> Try this technique from a post by Harlan ..
>
[quoted text clipped - 16 lines]
> >
> > Thank you
ronoee - 27 Jan 2007 17:43 GMT
Hello Max
Modified syntax further and now it works fine.
I got a Danish version and that was the trouble.
Danish syntax should bee
=MIDT(CELLE("Filename";INDIREKTE("A1"));FIND("]";CELLE("Filename";INDIREKTE("A1")))+1;32)
Thank you for helping.
"Max" skrev:
> Try this technique from a post by Harlan ..
>
[quoted text clipped - 16 lines]
> >
> > Thank you
Pete_UK - 28 Jan 2007 00:27 GMT
Many European countries seem to use a semicolon rather than a comma in
formulae to separate the syntactic elements - you should bear that in
mind in any future formulae which you get from the English newsgroups
(as well as needing to translate the names of the functions).
Pete
> Hello Max
>
[quoted text clipped - 34 lines]
>
> > > Thank you- Hide quoted text -- Show quoted text -
Max - 28 Jan 2007 00:48 GMT
Glad you got it up and running !

Signature
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
> Hello Max
>
[quoted text clipped - 5 lines]
>
> Thank you for helping.
Ali - 29 Jan 2008 14:51 GMT
This formula worked better for me because the earlier formula changed all the
cells that used that formula in the workbook regardless of what worksheet
they were in.
> Try this technique from a post by Harlan ..
>
[quoted text clipped - 16 lines]
> >
> > Thank you
Max - 29 Jan 2008 23:01 GMT
welcome, Ali.
Thanks for feeding back

Signature
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
> This formula worked better for me because the earlier formula changed all
> the
> cells that used that formula in the workbook regardless of what worksheet
> they were in.