1

I am using filter() to return a filtered range of cells. Of that result, I only want one column of the results (so that I can sum the values of that column). What is the syntax (or function) that I can use to do that?

I want to sum the values in column D that correspond to rows with "key_match" in column C.

I want to do something like: =SUM(GET_COLUMN(FILTER(B:F, C:C = "key_match"), D:D)). Filter rows of columns B-F where cells in column C == "key_match"; of that result, I want to calculate the sum of the values in column D. How can I do what I would like GET_COLUMN() to do?

0

1 Answer 1

1

You could just change your filter range:

=sum(FILTER(D:D,C:C="key_match"))

enter image description here

1
  • Ah! I misunderstood FILTER(). I thought the range had to represent the elements used in the condition (since the docs say "The data to be filtered.", but it merely specifies what is displayed?
    – wrlee
    Feb 27, 2017 at 22:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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