average if, multiple conditions... possible?

Jennifre

Board Regular
Joined
Jan 11, 2011
Messages
160
First of all thank you in advance. I have learned so much from the answers I've gotten from this board, thank you to all who've responded to my dorky queries here! :)

Yet, this one's got me. I have used sumproduct with multiple criteria, and how to use AverageIfs, but I'm hoping to combine that by using an averageif, with multiple criteria. What I have tried, doesn't work.

If anyone can help, I feel very grateful -- thank you for your syntax help!! My unworking effort so far:

Code:
{=AVERAGE(IF((ap$2:ap$1364=3,4),$cf$2:$cf$1364=1,2))}
 
To restate (hopefully correctly), I need the percentage of AP values 3 or 4 whose rows feature CF values 1 or 2.

If that's the requirement, then if there are 10 rows where 3 or 4 appears in column AP....and out of those 10 rows 2 of the column CF values are 1s and 2 are 2s then that would be a percentage of 40%.

You can do that using AVERAGE, i.e.

=AVERAGE(IF((AP2:AP100=3)+(AP2:AP100=4),IF((CF2:CF100=1)+(CF2:CF100=1),1,0)))

confirmed with CTRL+SHIFT+ENTER
 
Upvote 0

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Biff, I think that what you have given me will do the trick (need to check it, but I think it looks like it should work) -- THANK YOU SO MUCH!! :)
 
Upvote 0

Forum statistics

Threads
1,223,912
Messages
6,175,340
Members
452,638
Latest member
Oluwabukunmi

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