[英]link tab name of a worksheet to a cell in excel
how can I link the tab name of an excel sheet to a cell? 如何将Excel工作表的标签名链接到单元格? Do I have to write a macro with VBA? 我必须使用VBA编写宏吗? or can I use a function therefore? 还是可以使用功能?
Why I need this is: When I change the name of the tab I want to take it on for a cell in another worksheet. 我需要这样做的原因是:更改选项卡的名称时,我想将其用作另一个工作表中的单元格。
thx all. 全部。
Write the following formula: 写下以下公式:
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))
When you change the name of the worksheet, it will change. 当您更改工作表的名称时,它将更改。 About the CELL worksheet function, read more here: http://www.cpearson.com/excel/CellWorksheetFunctions.aspx 关于CELL工作表功能,请在此处阅读更多信息: http : //www.cpearson.com/excel/CellWorksheetFunctions.aspx
You actually have to write =CELL("filename")
to get the name of the tab plus the path of the worksheet. 实际上,您必须编写=CELL("filename")
以获得选项卡的名称以及工作表的路径。 And "filename" should be written. 并且应写上“文件名”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.