Taking average values of cells in a column conditional on a cell in another row having a particular value

inferno657

New Member
Joined
Aug 11, 2022
Messages
12
Office Version
  1. 365
Platform
  1. Windows
Essentially, I would like to take the mean average of the values in the 'incurred' column, conditional on those cells being part of a row that has the value 'Manual' in the other column. See screenshot for reference.

What I've tried to do is the following:

=AVERAGE(FILTER(H2:I100001,AI1:AI100001))

Unfortunately, this returned the 'VALUE!' error.

Any ideas?
 

Attachments

  • ref2.PNG
    ref2.PNG
    65.3 KB · Views: 5

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Essentially, I would like to take the mean average of the values in the 'incurred' column, conditional on those cells being part of a row that has the value 'Manual' in the other column. See screenshot for reference.

What I've tried to do is the following:

=AVERAGE(FILTER(H2:I100001,AI1:AI100001))

Unfortunately, this returned the 'VALUE!' error.

Any ideas?
Try this

Excel Formula:
=AVERAGE(FILTER(H2:I100001,AI2:AI100001="Manual"))

I wonder H2:I100001 will work
 
Upvote 0
It's still giving me the same type of error- I'm a little stuck
Oh Yes, It's bound to give errors - See Column H you have got so many NA for Manual - How will system average those and thus give error

Have to think some way to bye-pass those NA, I think over and revert
 
Upvote 0
Oh Yes, It's bound to give errors - See Column H you have got so many NA for Manual - How will system average those and thus give error

Have to think some way to bye-pass those NA, I think over and revert
See you have to have patience, it has become Trial-Error thing now

Try this

Excel Formula:
=AVERAGE(FILTER(H2:I100001,ISNUMBER(H2:I100001)*(AI2:AI100001="Manual")))
 
Upvote 0
Check that you don't have any #VALUE! errors in columns H & I.
 
Upvote 0
See you have to have patience, it has become Trial-Error thing now

Try this

Excel Formula:
=AVERAGE(FILTER(H2:I100001,ISNUMBER(H2:I100001)*(AI2:AI100001="Manual")))
Well I'm glad I have you here, that's all I can say!
See you have to have patience, it has become Trial-Error thing now

Try this

Excel Formula:
=AVERAGE(FILTER(H2:I100001,ISNUMBER(H2:I100001)*(AI2:AI100001="Manual")))
It was actually only column H I needed to filter- column I was a mistake that somehow entered the formula when I typed it, sorry. I put it into H only, and it seems to work! Thank you very much :)
 
Upvote 0
Well I'm glad I have you here, that's all I can say!

It was actually only column H I needed to filter- column I was a mistake that somehow entered the formula when I typed it, sorry. I put it into H only, and it seems to work! Thank you very much :)
Yes with single column it's working perfectly. I also checked with a sample data
 
Upvote 0
The Average Function ignores text so the cells with NA are not causing the problem.
Whilst using isnumber may get round the problem, are you sure that you are getting the correct answer? Especially if you have formulae in there that return an error.
 
Upvote 0
The Average Function ignores text so the cells with NA are not causing the problem.
Whilst using isnumber may get round the problem, are you sure that you are getting the correct answer? Especially if you have formulae in there that return an error.
Let me check on that and I revert back
 
Upvote 0

Forum statistics

Threads
1,215,465
Messages
6,124,982
Members
449,201
Latest member
Lunzwe73

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top