Google sheets formula - arrayformula to apply to each row

跟風遠走 提交于 2019-12-11 22:53:48

问题


I'm sure there is a really simple answer to this and I'm just missing it.

I need this formula to sum the contents of each row in D:F just for that row not sum the contents of columns D:F

=ARRAYFORMULA(
    if(
        row(A1:A)=1,
        "TOTAL HOUSING",
        sum(D:F)
    )
)

回答1:


One way would be to use MMULT

=ARRAYFORMULA(
if(
    row(A1:A)=1;
    "TOTAL HOUSING";
    MMULT(N(D:F); TRANSPOSE(COLUMN(D1:F1)^0))
)

)



来源:https://stackoverflow.com/questions/52366138/google-sheets-formula-arrayformula-to-apply-to-each-row

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