简体   繁体   中英

Excel: Dynamic INDIRECT when copying cell formula

I have the following formula

=INDIRECT("'"&$A$1&"'!"&"D3")

in A1 I have the name of another sheet and this correctly goes to that sheet, cell D3 and return the value. Now I'd like to drag this formula on the cell below and be automatically updated to

=INDIRECT("'"&$A$1&"'!"&"E3")

then drag below again and have

=INDIRECT("'"&$A$1&"'!"&"F3")

and so on...

is it possible or I have to manually change the cell? Is there another way?

thanks

To change the column reference as the formula is dragged down, use ADDRESS() which returns a string:

=INDIRECT("'" & $A$1 & "'!"&ADDRESS(3,ROW(4:4)))

The ROW() will be Dynamic and refer first to the 4th Column, or "D" and as it is dragged down it will refer to the 5th then the 6th and so forth.

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