Returning a value for an actual cell address

左心房为你撑大大i 提交于 2020-01-16 18:48:34

问题


I have two sheets: sheet1 and sheet2.

  • In sheet2 I have a column "C" called addresses and in that column I have actual cell addresses such as $J$740, $H$756, etc, all referring to cell locations in Sheet1.

  • In sheet1 in column "B" are names.

I would like to be able to return the names from sheet1 column "B" to column "G" of sheet2 that belong to the cell address from column "C" in sheet2.

Is there an Excel formula that will do this?


回答1:


Yes. This is very the purpose of the INDIRECT function.

In cell G2, you can write:

=INDIRECT("sheet1!"&C2)

and copy this formula down column G.

This will take the text in cell C2, say $J$740, and append it to the text sheet1! to give sheet1!$J$740. The INDIRECT function then returns the value of the cell corresponding to that address (cell J740 on sheet1).




回答2:


Hi all I found the answer to my question - thanks again for your help

=OFFSET(Sheet1!B$1,RIGHT(C2,LEN(C2)-FIND("$",C2,2))-1,0)


来源:https://stackoverflow.com/questions/25342030/returning-a-value-for-an-actual-cell-address

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!