Excel Countifs具有偏移function

我目前有一个数据集,我正在使用countifs和偏移来更改列参考,我拉下公式。

这是我的公式:

=COUNTIFS('Student Survey (Middle)'!B:B,'Middle Master'!A2,OFFSET('Student Survey (Middle)'!G:G,0,ROW()-4,1240,1),"agree") 

任何想法,为什么这是返回#值?

我会摆脱易失性的OFFSET,并使用:

 =COUNTIFS('Student Survey (Middle)'!B:B,'Middle Master'!A2,INDEX('Student Survey (Middle)'!G:XCC,0,ROW()-3),"agree")