Formula to reference name of sheet tab

G

Guest

I am trying to figure out a way in Excel to reference the name of the sheet
tab using a formula. For example, in a new Excel document, the name of the
first sheet tab defaults as "Sheet 1". I am trying to write a formula in cell
A1 that would reference and show "Sheet 1" so that if I renamed "Sheet 1" as
"Accounting", cell A1 would now read "Accounting.

Thank you in advance for help anyone can provide,
David
 
G

Guest

I opened a new Excel file and saved it as "Accounting" and then entered the
following formula in cell A1:
=MID(CELL("Accounting",$A$1),FIND("]",CELL("Accounting",$A$1))+1,100).

The result I got in cell A1 was "#VALUE!". Did I not enter it correctly?

Thank you

Duke Carey said:
Try

=MID(CELL("filename",$A$1),FIND("]",CELL("filename",$A$1))+1,100)


DBCollier said:
I am trying to figure out a way in Excel to reference the name of the sheet
tab using a formula. For example, in a new Excel document, the name of the
first sheet tab defaults as "Sheet 1". I am trying to write a formula in cell
A1 that would reference and show "Sheet 1" so that if I renamed "Sheet 1" as
"Accounting", cell A1 would now read "Accounting.

Thank you in advance for help anyone can provide,
David
 
D

Dave Peterson

Don't change "Filename" to "accounting". Use the characters "Filename" (case
doesn't matter).


I opened a new Excel file and saved it as "Accounting" and then entered the
following formula in cell A1:
=MID(CELL("Accounting",$A$1),FIND("]",CELL("Accounting",$A$1))+1,100).

The result I got in cell A1 was "#VALUE!". Did I not enter it correctly?

Thank you

Duke Carey said:
Try

=MID(CELL("filename",$A$1),FIND("]",CELL("filename",$A$1))+1,100)


DBCollier said:
I am trying to figure out a way in Excel to reference the name of the sheet
tab using a formula. For example, in a new Excel document, the name of the
first sheet tab defaults as "Sheet 1". I am trying to write a formula in cell
A1 that would reference and show "Sheet 1" so that if I renamed "Sheet 1" as
"Accounting", cell A1 would now read "Accounting.

Thank you in advance for help anyone can provide,
David
 
C

Chip Pearson

You need to use the literal word "filename" in the formula, not
the actual file name

=MID(CELL("filename",$A$1),FIND("]",CELL("filename",$A$1))+1,100).



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


message
I opened a new Excel file and saved it as "Accounting" and then
entered the
following formula in cell A1:
=MID(CELL("Accounting",$A$1),FIND("]",CELL("Accounting",$A$1))+1,100).

The result I got in cell A1 was "#VALUE!". Did I not enter it
correctly?

Thank you

Duke Carey said:
Try

=MID(CELL("filename",$A$1),FIND("]",CELL("filename",$A$1))+1,100)


DBCollier said:
I am trying to figure out a way in Excel to reference the
name of the sheet
tab using a formula. For example, in a new Excel document,
the name of the
first sheet tab defaults as "Sheet 1". I am trying to write
a formula in cell
A1 that would reference and show "Sheet 1" so that if I
renamed "Sheet 1" as
"Accounting", cell A1 would now read "Accounting.

Thank you in advance for help anyone can provide,
David
 
G

Guest

I copied and pasted the formula below into cell A1 and I still get a result
of "#VALUE!".

Chip Pearson said:
You need to use the literal word "filename" in the formula, not
the actual file name

=MID(CELL("filename",$A$1),FIND("]",CELL("filename",$A$1))+1,100).



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


message
I opened a new Excel file and saved it as "Accounting" and then
entered the
following formula in cell A1:
=MID(CELL("Accounting",$A$1),FIND("]",CELL("Accounting",$A$1))+1,100).

The result I got in cell A1 was "#VALUE!". Did I not enter it
correctly?

Thank you

Duke Carey said:
Try

=MID(CELL("filename",$A$1),FIND("]",CELL("filename",$A$1))+1,100)


:

I am trying to figure out a way in Excel to reference the
name of the sheet
tab using a formula. For example, in a new Excel document,
the name of the
first sheet tab defaults as "Sheet 1". I am trying to write
a formula in cell
A1 that would reference and show "Sheet 1" so that if I
renamed "Sheet 1" as
"Accounting", cell A1 would now read "Accounting.

Thank you in advance for help anyone can provide,
David
 
C

Chip Pearson

You can't use the formula in a workbook that has never been
saved, such as a new workbook. Once you save the file to disk,
the formula will work properly.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


message
I copied and pasted the formula below into cell A1 and I still
get a result
of "#VALUE!".

Chip Pearson said:
You need to use the literal word "filename" in the formula,
not
the actual file name

=MID(CELL("filename",$A$1),FIND("]",CELL("filename",$A$1))+1,100).



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


message
I opened a new Excel file and saved it as "Accounting" and
then
entered the
following formula in cell A1:
=MID(CELL("Accounting",$A$1),FIND("]",CELL("Accounting",$A$1))+1,100).

The result I got in cell A1 was "#VALUE!". Did I not enter
it
correctly?

Thank you

:

Try

=MID(CELL("filename",$A$1),FIND("]",CELL("filename",$A$1))+1,100)


:

I am trying to figure out a way in Excel to reference the
name of the sheet
tab using a formula. For example, in a new Excel
document,
the name of the
first sheet tab defaults as "Sheet 1". I am trying to
write
a formula in cell
A1 that would reference and show "Sheet 1" so that if I
renamed "Sheet 1" as
"Accounting", cell A1 would now read "Accounting.

Thank you in advance for help anyone can provide,
David
 
P

Peo Sjoblom

You need to save the workbook first


--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com



DBCollier said:
I copied and pasted the formula below into cell A1 and I still get a result
of "#VALUE!".

Chip Pearson said:
You need to use the literal word "filename" in the formula, not
the actual file name

=MID(CELL("filename",$A$1),FIND("]",CELL("filename",$A$1))+1,100).



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


message
I opened a new Excel file and saved it as "Accounting" and then
entered the
following formula in cell A1:
=MID(CELL("Accounting",$A$1),FIND("]",CELL("Accounting",$A$1))+1,100).

The result I got in cell A1 was "#VALUE!". Did I not enter it
correctly?

Thank you

:

Try

=MID(CELL("filename",$A$1),FIND("]",CELL("filename",$A$1))+1,100)


:

I am trying to figure out a way in Excel to reference the
name of the sheet
tab using a formula. For example, in a new Excel document,
the name of the
first sheet tab defaults as "Sheet 1". I am trying to write
a formula in cell
A1 that would reference and show "Sheet 1" so that if I
renamed "Sheet 1" as
"Accounting", cell A1 would now read "Accounting.

Thank you in advance for help anyone can provide,
David
 

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