Reputation: 573
Hi am simply trying to add two columns but this formula gives me one additional field sun()
in a cell. Look at the picture for this strange behaviour:
the formula i used is this :
=QUERY({IMPORTRANGE("xxxxxxx","xxx!A1:Z")select Col1,Col2,Col3,Col4,Col5,(Col6)+(Col7),Col8")
What is going on and how to resolve this?
Upvotes: 0
Views: 54
Reputation: 1
you can remove it if you use:
=QUERY({IMPORTRANGE("xxxxxxx", "xxx!A1:Z"),
"select Col1,Col2,Col3,Col4,Col5,Col6+Col7,Col8
label Col6+Col7''")
or like this:
=QUERY(QUERY({IMPORTRANGE("xxxxxxx", "xxx!A1:Z"),
"select Col1,Col2,Col3,Col4,Col5,Col6+Col7,Col8"),
"offset 1", 0)
Upvotes: 1
Reputation: 10573
Please use the label clause
as in:
=QUERY(A1:B,"select A+B label A+B 'Total' ")
In your case the formula would be:
=QUERY({IMPORTRANGE("xxxxxxx","xxx!A1:Z")select Col1,Col2,Col3,Col4,Col5,Col6+Col7,Col8 label Col6+Col7 '' ",0)
You do not need the extra ()
around the columns.
Upvotes: 2