title: How can I make a function in google sheet run on all the previous cells above until the previous function
body: <p>I want to make a function in google sheet, for example here &quot;sum&quot; I want it sum all above cells until the previous another function
  So if I copied it to another row it will sum all above cell until the previous function also (3 of pic).</p>
  <p><a href="https://i.stack.imgur.com/HmLrA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HmLrA.png" alt="enter image description here" /></a></p>