# Adding up cells which fulfill certain criteria

#### xl_psychic

##### Active Member
Hi,

I am facing a problem while trying to get an average of numbers.

I have Batch Numbers in Cell Range D16:D16 (1,2,3,4,etc.....) and I have Scores in Cell Range G16:J186 [Call 1 (Column G), Call 2 (Column H), Call 3 (Column I)and Call 4 (Column J)].

I am trying to find out the Average Scores for the entire month for a particular batch in question. I have used the following formula but it doesn't gimme the sum:

=SUMPRODUCT(--('Monthly Snapshot'!\$D\$16:\$D\$186=\$C\$6),--('Monthly Snapshot'!\$G\$16:\$J\$186=">=70"),'Monthly Snapshot'!\$G\$16:\$J\$186)

Where Monthly Snapshot is the name of the sheet from which the scores are being taken and batch number is being matched.
C6 is the Drop Down list for Batch Number.

The scores in the cell range are between 1 to 20 or either 70, 80, 90 and 100.

How do I go about doing the same.

Thank you

Rohan Fernandes

### Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

#### Andrew Poulsom

##### MrExcel MVP
Maybe:

=SUMPRODUCT(--('Monthly Snapshot'!\$D\$16:\$D\$186=\$C\$6),--('Monthly Snapshot'!\$G\$16:\$J\$186>=70),'Monthly Snapshot'!\$G\$16:\$J\$186)

Putting quotes around the test results in a search for that string.

#### Joe4

I kind of got lost in your details, but if you are trying to do a conditional average, would somehting like this work?

=SUMIF(...)/COUNTIF(...)

#### xl_psychic

##### Active Member
Thanks Andrew..

It solved the problem.

##### MrExcel MVP
hi cesloan - welcome to the board!

you should start a new thread for new topics, even if they're related to previous ones (in which case, you're better off posting a link in your new thread).

Replies
2
Views
421
Replies
4
Views
236
Replies
1
Views
272
Replies
0
Views
209
Replies
3
Views
257

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,152,321
Messages
5,769,444
Members
425,546
Latest member
DisMissive

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back