Search code examples
google-sheets-formula

How to get sum of rows based on a key value?


I am looking for a formula to get the sum of protein column for individual recipes. Need some help. enter image description here


Solution

  • You may try:

    =sumif(scan(,J:J,lambda(a,c,if(cell("prefix",c)<>"",c,a))),"Veggie Omlette",N:N)