how to use AVERAGEIF with 12 arguments?

bonbonboy

New Member
Joined
Oct 12, 2015
Messages
27
Hello here :)

I would like to calculate the average of chosen cells in excluding 0.

Based on that formula
Excel Formula:
=AVERAGEIF(I8,K8,M8,O8,Q8,S8,U8,W8,Y8,AA8,AC8,"<>0")
, i have to much arguments BUT i cannot take a range.
In J8, L8, N8 etc... there are some values i don't want to include in the calculation of the average.

Also i cannot make it vertically because each horizontal line defines someone, that's why my goal is to get my formula for each line.

Do you have some ideas please?
Thank you beforehand :)
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Thx for your reply but it doesn't work, AVERAGEIFS expects all arguments after position 3 to be in pairs :/
And i cannot create some small ranges as (I8:K8, M8:O8...), each cell is independent.
 
Upvote 0
Do you have any sort of indicator like a header row that could be used to determine which columns to include?

Also, I suggest you update your profile to indicate which version of Office you have as it will affect the possible solutions.
 
Upvote 0
Try this

Excel Formula:
=AVERAGE(IFERROR(1/(1/(INDEX(I8:AC8,2*(ROW(A1:A11)-1)+1))),""))
 
Upvote 0
Two more

Excel Formula:
=AVERAGE(IFERROR(1/(1/(IF(ISODD(ROW(1:21)),TRANSPOSE(I8:AC8),""))),""))

Excel Formula:
=AVERAGE(IFERROR(1/(1/(FILTER(I8:AC8,TRANSPOSE(ISODD(SEQUENCE(21)))))),""))
 
Upvote 0
@RoryA my sheet is on google sheets.
Below a sample of my table

HIJKLMNO
23/1224/1227/1228/12
TotalDailyTDTDTD
8Mike3838380380380
9Lewis313114711628213531331
10Arnold0000001919
11Carol000033433438551

@JEC : your formula works for the line 8, but not at all for the next lines :(
 
Upvote 0
Yes you need to Fix the row function

Excel Formula:
=AVERAGE(IFERROR(1/(1/(INDEX(I8:AC8,2*(ROW($A$1:$A$11)-1)+1))),""))
 
Upvote 0

Forum statistics

Threads
1,223,367
Messages
6,171,669
Members
452,416
Latest member
johnog

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