简体   繁体   English

将工作表的选项卡名称链接到excel中的单元格

[英]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.

相关问题 VBA根据不同工作表上单元格中的名称将图表从excel选项卡中拉到特定的文件夹和名称文件 - VBA to exort chart from excel tab to specific folder and name file based on a name in a cell on a different worksheet 工作表选项卡名称更改基于单元格值 - Worksheet Tab name change based on cell value 使用左上方的链接单元格链接到Excel工作表 - Link to Excel Worksheet with Linked Cell in Upper Left Python/Openpyxl:将工作簿中所有 excel 工作表中的单元格 A1 更改为等于工作表选项卡的名称 - Python/Openpyxl: change cell A1 in all excel worksheets within a workbook to equal the name of the worksheet tab Excel单元格中的单独选项卡名称 - Excel separate tab name in a cell Excel宏根据工作表的名称命名范围选项卡名称 - Excel Macro to name ranges according to the name of the worksheet Tab name 如何将Excel OptionButton链接到工作表中的单元格? - How do I link an Excel OptionButton to a cell in a worksheet? 如何在选项卡名称为动态的Excel中激活工作表 - How to activate a worksheet in Excel, where the tab name is dynamic 具有两个单元格值条件的Excel worksheet.name - Excel worksheet.name with two cell value criteria 使用单元格引用作为工作簿和工作表的名称来激活Excel工作簿/工作表 - Activating Excel Workbook/Sheet using cell reference as name of Workbook and Worksheet
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM