SUMIF dynamically change summing column

后端 未结 2 1830
余生分开走
余生分开走 2021-01-06 16:15

I am using SUMIFS and want the sum_range dynamically to change according to the name I have of a column.

I have a table with about 100 columns. Say one of t

2条回答
  •  抹茶落季
    2021-01-06 16:57

    Try using this in place of the sum range

    INDEX(Sheet4!A:DZ,0,MATCH("Paid_BC_Items",A1:DZ1,0))

    when you use INDEX with 0 as the row argument you get the whole column....and MATCH picks the right column based on the header

    Whole formula becomes:

    =SUMIFS(INDEX(Sheet4!A:DZ,0,MATCH("Paid_BC_Items",A1:DZ1,0)),Sheet4!$C:$C,Sheet2!$D$3,Sheet4!$E:$E, Sheet2!$C6, Sheet4!$G:$G, Sheet2!$D6)

提交回复
热议问题