Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use the following formula in my Google Spreadsheet:

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

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


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?

share|improve this question

migrated from superuser.com Jan 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
up vote 5 down vote accepted

You can use the following formula for that:

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

share|improve this answer
Thanks for this. This really needs be in the documentation for the QUERY function: support.google.com/drive/answer/3093343 – Sean Glover Jan 4 '14 at 15:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.