how to drag horizontally a formula which is a string fixed

点点圈 提交于 2019-12-12 02:49:24

问题


I have the following formula in excel

=MAX(INDIRECT($A2 & "!"&"B2:B5"))

A2 is a cell in the current worksheet, which is the name of a worksheet tab. However what i wish to do is drag the formula horizontally like that of standard excel formulas to reference the cells of the "other" worksheet tab

So if i dragged horizontally i would get:

=MAX(INDIRECT($A2 & "!"&"C2:C5"))

=MAX(INDIRECT($A2 & "!"&"D2:D5"))

etc

This wont work with the formulas as a fixed text..so how would i do this?


回答1:


This will solve your problem. Though not sure whether this is the best solution.

=MAX(INDIRECT($A2 & "!" & CHAR(COLUMN()+64) & "2:" & CHAR(COLUMN()+64) & "5"))



回答2:


Another way is

=MAX(INDIRECT($A2 & "!"&ADDRESS(ROW(),COLUMN())&":"&ADDRESS(ROW()+3,COLUMN())))

if you want the range to start in the same row and column on the second sheet and finish three rows down.



来源:https://stackoverflow.com/questions/36809836/how-to-drag-horizontally-a-formula-which-is-a-string-fixed

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