# An average for numbers that fall within a criteria

#### bzax33

##### New Member
I need to figure out a way to get an average for the numbers in column A, but ONLY those numbers in column A that have the number "1" in column B.
example:
Column A Column B
3 5
6 1
4 1

The average would be "5", because the numbers 6 and 4 have "1" next to them in column B.
Thanks!

### Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

#### barry houdini

##### MrExcel MVP
You can use AVERAGEIF in Excel 2007 and later, i.e.

=AVERAGEIF(B:B,1,A:A)

Replies
0
Views
65
Replies
5
Views
357
Replies
7
Views
195
Replies
3
Views
435
Replies
1
Views
339

1,195,835
Messages
6,011,872
Members
441,651
Latest member
drewe2000

### 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