简体   繁体   English

excel-使用一个单元格中的值到另一张工作表中的参考值

[英]excel - Using the value from one cell to reference value in a different sheet

I'm trying to get the value in one cell to be used to reference another cell. 我正在尝试获取一个单元格中的值以用于引用另一个单元格。 So far what I've found is that the following formula should do the trick but somehow I can't get it to work. 到目前为止,我发现下面的公式应该可以解决问题,但是以某种方式我无法使它起作用。

In cell E5 I have the sheet name which is build up as XX-XX-XX-XX in which the XX 's are all numerical values. E5单元格中,我具有工作表名称,该工作表名称由XX-XX-XX-XX ,其中XX均为数字值。

In another cell I want to have the data that's in cell D2 from the sheet 12-12-12-12 . 在另一个单元格中,我想获取工作表12-12-12-12中的单元格D2的数据。

I have tried the following formula but something doesn't seem to work: 我尝试了以下公式,但似乎无法正常工作:

=INDIRECT("'"&E5&"'!"&"D2")

If I check out the formula in error check it goes to this before it fails: 如果我检查出错误的公式,将在失败之前进行检查:

=INDIRECT("'12-12-12-12!D2")

Does anyone know a solution for this? 有谁知道解决方案吗?

=INDIRECT("'"&E5&"'"&"!D2")

或者如果您想要单元格引用与!分开

=INDIRECT("'"&E5&"'"&"!"&"D2")

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Excel 从垂直单元格表引用到水平单元格获取值 - Excel get value from vertical cell sheet reference to horizontally cell 根据列中的值填充其他工作表中的excel单元格值 - Populate excel cell value from a different sheet based on value in a column 用于在每个副本的一个单元格中打印具有不同值的Excel工作表的宏 - Macro for printing of excel sheet with different value in one cell for each copy 使用 Excel 中的 VBA 将基于单元格值的工作表中的数据提取到新工作表中 - Extracting data from one sheet based on a cell value into a new sheet using VBA in Excel 使用VBA通过相对于当前工作表中活动单元格的相对引用来设置不同工作表中特定单元格的值 - Using VBA to set the value of a specific cell in a different sheet using relative reference to active cell in current sheet 从一个单元格中获取价值并将其集中在另一张表上 Vba Excel - Get Value from one cell and focus it on another sheet Vba Excel 根据单元格值将行从一个 Excel 工作表复制到另一个 - Copying rows from one Excel sheet to another based on cell value 使用一个单元格的值在不同的工作表上定位另一个单元格 - Using the value of one cell to locate another on a different sheet 如果单元格与Excel中的上述单元格不同,则显示不同的值 - Show different value if cell is different from the one above in Excel 连接另一个工作表中的Excel单元格值 - Concatenate Excel cell value from another sheet
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM