View Full Version : Display sheet name in a cell
kaqkns
02-17-2007, 12:06 PM
Dears,,,
Thank you for this gooood site.
my porblem is happend today that my boss ask me hwo to show the sheet name into same sheet for example my sheet is named as ABC and I want to show or display the name of my Sheet (ABC ) in the cell A2 for example?
thanks and regards
kaqkns
Edit: Retitled
Simon Lloyd
02-17-2007, 12:28 PM
the answer is already here http://www.vbaexpress.com/kb/getarticle.php?kb_id=213 regards,
Simon
ndendrinos
02-17-2007, 12:40 PM
Similar but keep in mind that if you change the name of the tab A2 will not change right away ... you have to select another sheet and come back and A2 will change then.
Charlize
02-17-2007, 12:44 PM
How to use. Put in A2 : =sname()
Function sname() As String
sname = ActiveSheet.Name
End Function
lucas
02-17-2007, 12:46 PM
Non VBA solution:
Formula in cell. Workbook must be saved for this to work.
=RIGHT(CELL("filename"),LEN(CELL("filename"))-FIND("]",CELL("filename")))
This changes immediately if you change the tab name.
Bob Phillips
02-17-2007, 01:12 PM
Can I join in? See http://xldynamic.com/source/xld.xlFAQ0002.html
lucas
02-17-2007, 01:23 PM
I had never noticed that before Bob......thanks. Your solution works perfectly. Please disregard my post #5 as Bob has pointed out it has problems.:omg2:
kaqkns
02-17-2007, 01:51 PM
Thanks for All who give replay to my problem
Yours
kaqkns
lucas
02-17-2007, 02:01 PM
kaqkns,
Glad you were able to get the help you needed. Be sure to mark your thread solved using the thread tools at the top of the page. Could you please change the name of your thread to something like "Sheet name in Cell value" or something like that to reflect the topic of the thread. If you don't know how and would like for me to do it let me know.
Brandtrock
02-17-2007, 06:33 PM
Can I join in? See http://xldynamic.com/source/xld.xlFAQ0002.html
Nicely done Bob.
Regards,
Can I join in? See http://xldynamic.com/source/xld.xlFAQ0002.html
:clap: nice..
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.