# Averaging a number and counting person

#### phillexcel

##### New Member
Stuck with this one, I'm wondering if anyone can help?

B2:B349 shows a person's name, for example 'Alex'

I2:I349 shows a number

In cell G371 what I need is the average of those numbers taken from the cells In I2:I349 but only if the cell in B349 shows that persons name (for this example Alex)

### Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

#### VoG

##### Legend
If Excel 2007or later try

=AVERAGEIF(B2:B349,"Alex",I2:I349)

#### phillexcel

##### New Member
Bingo! Cheers pal

#### phillexcel

##### New Member
How do you get it to ignore DIVO and replace with a blank cell with this formula?

#### VoG

##### Legend
Try
=IFERROR(AVERAGEIF(B2:B349,"Alex",I2:I349),"")

#### phillexcel

##### New Member
Try
=IFERROR(AVERAGEIF(B2:B349,"Alex",I2:I349),"")

Perfect, thanks.

Replies
5
Views
223
Replies
0
Views
299
Replies
5
Views
223
Replies
11
Views
248
Replies
3
Views
148

### Forum statistics

1,190,954
Messages
5,983,826
Members
439,863
Latest member
GMC The Macro Man

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