Google sheets formula - arrayformula to apply to e

2019-08-24 09:32发布

问题:

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))
)

)