AverageIFs returning a value error in Excel for Mac

ghulatid

New Member
Joined
Sep 10, 2016
Messages
1
I have a column like:

[TABLE="******* 388"]
<colgroup><col></colgroup><tbody>[TR]
[TD]closed_cost_1_0.05_0.0_0.01_wordgrams[/TD]
[/TR]
[TR]
[TD]f1[/TD]
[/TR]
[TR]
[TD]1[/TD]
[/TR]
[TR]
[TD]0[/TD]
[/TR]
[TR]
[TD]0.045454545[/TD]
[/TR]
[TR]
[TD]0[/TD]
[/TR]
[TR]
[TD]0[/TD]
[/TR]
[TR]
[TD]0[/TD]
[/TR]
[TR]
[TD]0[/TD]
[/TR]
[TR]
[TD]0[/TD]
[/TR]
[TR]
[TD]0.032258065[/TD]
[/TR]
[TR]
[TD]0[/TD]
[/TR]
[TR]
[TD]0[/TD]
[/TR]
[TR]
[TD]0.142857143[/TD]
[/TR]
[TR]
[TD]0.015267176[/TD]
[/TR]
[TR]
[TD]0[/TD]
[/TR]
[TR]
[TD]0.227272727[/TD]
[/TR]
[TR]
[TD]0.225806452[/TD]
[/TR]
[TR]
[TD]0[/TD]
[/TR]
[TR]
[TD]0.047619048[/TD]
[/TR]
[TR]
[TD]0[/TD]
[/TR]
[TR]
[TD]0[/TD]
[/TR]
[TR]
[TD]0.023529412[/TD]
[/TR]
[TR]
[TD]0.056338028[/TD]
[/TR]
[TR]
[TD]0[/TD]
[/TR]
[TR]
[TD]0[/TD]
[/TR]
[TR]
[TD]0[/TD]
[/TR]
[TR]
[TD]0[/TD]
[/TR]
[TR]
[TD]0[/TD]
[/TR]
[TR]
[TD]0.037735849[/TD]
[/TR]
[TR]
[TD]0[/TD]
[/TR]
[TR]
[TD]0[/TD]
[/TR]
[TR]
[TD]0[/TD]
[/TR]
[TR]
[TD]0.196428571[/TD]
[/TR]
[TR]
[TD]0.191780822[/TD]
[/TR]
[TR]
[TD]0[/TD]
[/TR]
[TR]
[TD]0[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]I want to average all these values if the second row is "f1" (sometimes it is "precision" or "recall").

I am trying =AVERAGEIFS(B4:B37,B2,"=f1") but it is getting a value error. Why? Also why is =AVERAGEIFS(B4:B37,B4:B37,"<>0",B2,"=f1") not working either?

Thanks.[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
In words, what are you trying to do?

If you want to average B2:B47 when B2 is f2 then =IF(B2="f2", Average(B2:B47))
 
Last edited:
Upvote 0
If you have several columns and want to average only those with a particular header, you could use a formula like this


Unknown
ABCDEFG
1recall10.625
2recallrecall
3
426042
500
6000
703042
8191241
9000
1000
11000
12000
Sheet1
Cell Formulas
RangeFormula
G1=SUMPRODUCT($B$4:$D$12*($B$2:$D$2=F1))/SUMPRODUCT(--ISNUMBER($B$4:$D$12)*($B$2:$D$2=F1))
 
Upvote 0

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

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