Ask Your Question
0

SELECT WHERE [closed]

asked 2017-09-12 15:55:33 +0200

Deever gravatar image

updated 2020-07-27 00:08:13 +0200

Alex Kemp gravatar image

Hi folks!

I have a sheet with columns A, B and C and liked to have in E1 the value of the cell in C where the cells in A and B have some specific values. In SQL I'd do:

select C from Sheet1 where A='foo' and B='bar'

How can this be done in Calc?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2020-07-27 00:08:21.904863

2 Answers

Sort by » oldest newest most voted
0

answered 2017-09-12 17:49:33 +0200

JohnSUN gravatar image

Why not?

=SUMIFS(C:C;A:A;"foo";B:B;"bar")

or

=SUMPRODUCT(C:C;A:A="foo";B:B="bar")

It's more like "select SUM(C)...". But you said in the question that for the result you select one cell E1.

edit flag offensive delete link more
0

answered 2017-09-12 22:00:38 +0200

Deever gravatar image

Ah, sure! SUMPRODUCT again! Thank you so much, hope I don't need to ask this question a 3rd time! :)

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-09-12 15:55:33 +0200

Seen: 597 times

Last updated: Sep 12 '17