Array Index formula to average 2 columns

sgs31

New Member
Joined
Aug 19, 2014
Messages
8
This is what I have and it works on other cells that I don't want averaged.

Code:
=IFERROR(INDEX(Archive!$U$6:$U$10000, SMALL(IF($G$4=Archive!$B$6:$B$10000, ROW(Archive!$B$6:$B$10000)-ROW(Archive!$B$6)+1), ROW(1:1))),"")

For a few cells I want to average two different index locations. I tried...

Code:
=IFERROR(INDEX(AVERAGE(Archive!$U$6:$U$10000,Archive!$V$6:$V$10000), SMALL(IF($G$4=Archive!$B$6:$B$10000, ROW(Archive!$B$6:$B$10000)-ROW(Archive!$B$6)+1), ROW(1:1))),"")

Obviously this didn't work!

Is there a way to average this without making a new column for index with averages already in place (a lot more work)?

Any help would be greatly appreciated.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Shouldn't this:
=IFERROR(INDEX(AVERAGE...
be
=IFERROR(AVERAGE(INDEX...
like
=IFERROR(AVERAGE(INDEX1,INDEX2),"")
where Index1 returns first value...
 
Last edited:
Upvote 0
I was thinking the same thing... but I still can't get it to work. I must be writing it out wrong.
 
Upvote 0
Code:
=(INDEX(Archive!$U$6:$U$10000,SMALL(IF($G$4=Archive!$B$6:$B$10000,ROW(Archive!$B$6:$B$10000)-ROW(Archive!$B$6)+1),ROW(1:1)))+INDEX(Archive!$V$6:$V$10000,SMALL(IF($G$4=Archive!$B$6:$B$10000,ROW(Archive!$B$6:$B$10000)-ROW(Archive!$B$6)+1),ROW(1:1))))/2

couldn't figure it out so I just added and then divided... works good enough
 
Upvote 0
Code:
=IF(E7="","",(IFERROR((INDEX(Archive!$U$6:$U$10000,SMALL(IF($G$4=Archive!$B$6:$B$10000,ROW(Archive!$B$6:$B$10000)-ROW(Archive!$B$6)+1),ROW(1:1)))+INDEX(Archive!$V$6:$V$10000,SMALL(IF($G$4=Archive!$B$6:$B$10000,ROW(Archive!$B$6:$B$10000)-ROW(Archive!$B$6)+1),ROW(1:1)))),"")/2))

Cleaned up some errors for anyone else that may stumble upon it.
 
Upvote 0

Forum statistics

Threads
1,213,553
Messages
6,114,279
Members
448,562
Latest member
Flashbond

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