Google-sheets – Google sheet multiple column lookup

google sheets

I have a table that looks like this:

A  |   B    | C
---|--------|---
10 | Item x | 1
10 | Item y | 1
10 | Total  | 2
20 | Item x | 4
20 | Item z | 5
20 | Total  | 9

Now I would like to perform a multiple column lookup on this where I give the ID(A) and the Label(B) and get back the Value(C).

I tried this to get value 9 for id 20 and total label:

=FILTER(C:C,A:A=20,B:B="Total")

But I get #N/A no matches found error. What am I doing wrong here?
Hint: the Total entry per ID does only exist one or none at all.

Best Answer

I was able to successfully execute your constructed formula.

Screenshot

enter image description here

Most probably you have either white spaces before or after the text Total. You can use the following formula to check the length of the text for a column:

=ARRAYFORMULA(LEN(C:C))

Removing those will (hopefully) yield 9. Good luck !!