Carol.Kar
Carol.Kar

Reputation: 5215

SumIf certain values are in a range

I want to sum up all values that go for a certain country.

I tried:

=SUMIF(B2:B7;D2=$A$2:$A$7)

However, I get 0 back as seen in the picture below.

enter image description here

Any recommendations what I am doing wrong?

Upvotes: 2

Views: 81

Answers (1)

Glorfindel
Glorfindel

Reputation: 22661

You need to specify the 'test' range and the 'sum' range as separate parameters: try

=SUMIF($A2:$A7; D2; $B2:$B7)

Upvotes: 3

Related Questions