IF formula based on specific values in a range

Mushroomman

New Member
Joined
Mar 8, 2014
Messages
14
Hi,

I'm trying to average values based on 2 fields. The 1st is straight forward (by date). The second one isn't as straight forward.

I need to average column C if column A contains houses numbers 31,36,37,41,46,48 and the date is 01-06-16.

So the average of the example below is 9 (houses 31 & 37 are on 01-06-16).

I've used averageifs formula and used the IF with AND before, but only when numbers are in order (between 1 & 10), not when I need to search specific numbers.

Thanks,
Paul

[TABLE="width: 500"]
<tbody>[TR]
[TD]House Number[/TD]
[TD]Date[/TD]
[TD]Yield[/TD]
[/TR]
[TR]
[TD]31[/TD]
[TD]01-06-16[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]36[/TD]
[TD]02-06-16[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]37[/TD]
[TD]01-06-16[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]03-06-16[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]01-06-16[/TD]
[TD]10[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Control+shift+enter, not just enter:

=AVERAGE(IF($B$2:$B$6="01-06-16"+0,IF(ISNUMBER(MATCH($A$2:$A$6,{31,36,37,41,46,48},0)),$C$2:$C$6)))
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,885
Members
452,364
Latest member
springate

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