首页 > 解决方案 > How to fix `array literal error' when merging formulas?

问题描述

I made a Google sheet with a pivot formula. To replace the empty cells with zeros, I have written formula. The formula is merged from 3 individual formulas. The formulas work individually, but after merging I get an Array Literal error. What am I missing?

link to the Google Sheet https://docs.google.com/spreadsheets/d/17De4sUlkBmDKoFw4DR9serilGFcKQCur2PlvQ6RaMKk/edit?usp=sharing

Merging the formulas gives an array literal error message, where I expect a working outcome

I hope someone can help me.

标签: if-statementgoogle-sheetsgoogle-sheets-formulaarray-formulasgoogle-sheets-query

解决方案


尝试:

=ARRAYFORMULA(IF(
 QUERY(A3:E; "select A,sum(D) where A !='' group by A pivot B"; 1)<>""; 
 QUERY(A3:E; "select A,sum(D) where A !='' group by A pivot B"; 1); 0))

0


推荐阅读