Tell me more ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

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)

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?

share|improve this question
Your line of code is impossible to interpret without know what cells B3 and A3 are. – KronoS Jan 15 at 19:27
Can you give me some feedback on the answer I gave you? Did it work? – Jacob Jan Tuinstra Jan 30 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 at 17:59

migrated from superuser.com Jan 26 at 19:57

1 Answer

up vote 1 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

Your Answer

 
discard

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.