问题
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