Search code examples
google-sheetssum

Sum column until first empty cell


i have the following table:

A1 - 25

A2 - 26

A3 - 27

A4 - BLANK

A5 - 30

A6 - 23

A7 - BLANK

A8 - 24

In B1, i want the following - Starting from A1, sum up the entries until the first blank cell is encountered. In this case, it would be 25+26+27 = 78.

I have looked at multiple answers for hours and tried tweaking them, but nothing is working. Any help is appreciated (Also many things do not make sense, the function isblank(a1:a10) is going to return true or false, then how does arrayformula(isblank(a1:a10)) suddenly convert it to an array, since isblank is just returning a boolean?)


Solution

  • Here's another way you can do it:

    =SUM(A1:INDEX(A:A,XMATCH(,LEN(A:A))))
    

    enter image description here