简体   繁体   中英

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.

In another cell I want to have the data that's in cell D2 from the sheet 12-12-12-12 .

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")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM