Home > Back-end >  Google Sheets query to get sum of two columns
Google Sheets query to get sum of two columns

Time:10-10

I am trying to get sum of two columns using Query function and am getting perfect result when all the two columns have value, however, if any of the column is not having a value than the result will be blank. In such a case I want to reflect the value of the second column having data. Check the below image:

enter image description here

Formula used =QUERY(A2:C,"select A,B C label B C ''",0)

Sharing the link of the sheet too for reference. enter image description here

CodePudding user response:

try:

=INDEX({A2:A4, B2:B4 C2:C4})
  • Related