Stuneris
Stuneris

Reputation: 77

Excel COUNTIF near cell have some value

I have problem with getting count of some value who in near cell have some name. I'm trying this:=COUNTIF(C3:C20;B3:B20="apple") But it returns 0. table like this:

apple     50
bannana   70
lemon     35
apple     45
lemon     25

I want to get sum of all apples, this time it be 95.

Upvotes: 0

Views: 253

Answers (2)

Dmitry Pavliv
Dmitry Pavliv

Reputation: 35863

Use this one:

=SUMPRODUCT((B3:B20="apple")*(C3:C20))

Upvotes: 0

L42
L42

Reputation: 19737

Use Sumif or Sumifs instead. Like this:

=SUMIFS(C3:C20,B3:B20,"apple")

Upvotes: 1

Related Questions