Add wiorksheet name to a formula on the same worksheet

  • Thread starter Thread starter Phillip Topping
  • Start date Start date
P

Phillip Topping

Can somebody tell me how to include the name of a worksheet in a formula on
that same page?

For example, if I change "Sheet 1" to "Phillip", can I get cell A1...or any
cell to display "This is Phillip's worksheet"?

I know it can be done in Quattro Pro as I am converting a large Quattro Pro
file at present.

TIA
Phillip
 
Can somebody tell me how to include the name of a worksheet in a formula on
that same page?

For example, if I change "Sheet 1" to "Phillip", can I get cell A1...or any
cell to display "This is Phillip's worksheet"?

I know it can be done in Quattro Pro as I am converting a large Quattro Pro
file at present.

TIA
Phillip

In A1 put the formula (all on one line):

="This is "&MID(CELL("filename"),FIND("]",CELL("filename"))+1,255)&"'s
worksheet"

It will only work after the workbook has been saved.


--ron
 
Hi Ron,
Thanks for that, it does exactly what I want :)

Regards
Phillip

Ron Rosenfeld said:
Can somebody tell me how to include the name of a worksheet in a formula on
that same page?

For example, if I change "Sheet 1" to "Phillip", can I get cell A1...or any
cell to display "This is Phillip's worksheet"?

I know it can be done in Quattro Pro as I am converting a large Quattro Pro
file at present.

TIA
Phillip

In A1 put the formula (all on one line):

="This is "&MID(CELL("filename"),FIND("]",CELL("filename"))+1,255)&"'s
worksheet"

It will only work after the workbook has been saved.


--ron
 
Phillip

If you want something a little shorter copy/paste this Function to your
personal.xls so it is available for all open workbooks.

Function shtname()
Application.Volatile
shtname = Application.Caller.Parent.Name
End Function

="This is " & shtname() & "'s worksheet"

Gord Dibben Excel MVP - XL97 SR2 & XL2002


Hi Ron,
Thanks for that, it does exactly what I want :)

Regards
Phillip

Ron Rosenfeld said:
Can somebody tell me how to include the name of a worksheet in a formula on
that same page?

For example, if I change "Sheet 1" to "Phillip", can I get cell A1...or any
cell to display "This is Phillip's worksheet"?

I know it can be done in Quattro Pro as I am converting a large Quattro Pro
file at present.

TIA
Phillip

In A1 put the formula (all on one line):

="This is "&MID(CELL("filename"),FIND("]",CELL("filename"))+1,255)&"'s
worksheet"

It will only work after the workbook has been saved.


--ron
 
Back
Top