arrayformula sum in Google spreadsheet

前端 未结 10 2332
野性不改
野性不改 2020-12-14 17:02

How do you arrayformula() a sum() such as:

=sum(A1:H1)

I need to go down 1000 rows.

相关标签:
10条回答
  • 2020-12-14 17:30

    Summing A-H horizontal and running down for 523 lines:

    =ARRAYFORMULA(iferror(mmult(A1:H523;TRANSPOSE(column(A1:H1))^0)))
    
    0 讨论(0)
  • 2020-12-14 17:33

    Let us not complicate this. Simply put parenthesis in each of the array in the range.

    =arrayformula( Sum( (A1:A):(H1:H) )
    

    This spans not only upto 1000 rows but upto infiinity.

    If you really want to limit then go

    =arrayformula( Sum( (A1:A1000):(H1:H1000) )
    
    0 讨论(0)
  • 2020-12-14 17:35

    Using Query

    =INDEX(TRANSPOSE(
      QUERY(TRANSPOSE(FILTER(A2:H,A2:A<>"")),
      "select sum(Col"&JOIN("), sum(Col",SEQUENCE(COUNTA(A2:A)))&")",0)
    ),,2)
    

    notes:

    • generating query string on the fly
    0 讨论(0)
  • 2020-12-14 17:38

    Another option:

    =ArrayFormula(SUMIF(IF(COLUMN(A1:H1),ROW(A1:A1000)),ROW(A1:A1000),A1:H1000))
    
    0 讨论(0)
提交回复
热议问题