``````QUERY(Inkomster!A2:G;"SELECT SUM(C) WHERE G="&B3&" AND F='"&A3&"'")
``````

This returns the following (On two different rows that is)

``````H1=sum
H2=3720
``````

I don't want the result of the query to return two rows, I'm not interested in the first row. Just the second one. How can I accomplish that?

-

migrated from superuser.comJan 26 '13 at 19:57

This question came from our site for computer enthusiasts and power users.

Your line of code is impossible to interpret without know what cells `B3` and `A3` are. – KronoS Jan 15 '13 at 19:27
Can you give me some feedback on the answer I gave you? Did it work? – Jacob Jan Tuinstra Jan 30 '13 at 17:28
Sorry about that. I tried it know and it did indeed work. However i'd already solved it using query without Sum, and then encapsulate the query method with sum(). – Anton Gildebrand Jan 30 '13 at 17:59

``````INDEX(QUERY(Inkomster!A2:G;"SELECT SUM(C) WHERE G="&B3&" AND F='"&A3&"'"),2,0)
The `2` references the row number and the `0 or 1` references the column number