Average columns based on intermingled criteria

rosnorter

New Member
Joined
May 27, 2021
Messages
2
Office Version
  1. 2019
Platform
  1. Windows
Hello!
I am trying to get an average of multiple columns based on the criteria from the previous cell. These are every other one, so I am having a hard time getting it to sort out the data. I need column BS to average all of the Strength Results of the cells that have a Cure Time of 28. See screenshot below. Would anybody be able to help me out? I have tried a combination of AVERAGE, IF, AVERAGEA, etc and can't seem to get it too work.

1622143041747.png


Thanks, Terence
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Welcome to MrExcel!

Try:

=SUMPRODUCT(--(BA5:BQ5=28),--(MOD(COLUMN(BA5:BQ5)-COLUMN(BA5),2)=0),BB5:BR5)/SUMPRODUCT(--(BA5:BQ5=28),--(MOD(COLUMN(BA5:BQ5)-COLUMN(BA5),2)=0))

Edit: If the strength result column could NEVER be 28, then you could use the simpler:

=AVERAGEIF(BA5:BQ5,28,BB5:BB5)
 
Last edited:
Upvote 0
Solution
Welcome to MrExcel!

Try:

=SUMPRODUCT(--(BA5:BQ5=28),--(MOD(COLUMN(BA5:BQ5)-COLUMN(BA5),2)=0),BB5:BR5)/SUMPRODUCT(--(BA5:BQ5=28),--(MOD(COLUMN(BA5:BQ5)-COLUMN(BA5),2)=0))

Edit: If the strength result column could NEVER be 28, then you could use the simpler:

=AVERAGEIF(BA5:BQ5,28,BB5:BB5)
Thanks Eric! That works perfect. Now I'll have to go through and figure out how you did that. ?
 
Upvote 0

Forum statistics

Threads
1,214,912
Messages
6,122,200
Members
449,072
Latest member
DW Draft

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