Forum Discussion
Noths760
Sep 06, 2021Copper Contributor
Average of nonsequential range if adjacent values meet some criteria...
Hi 🙂 I am trying to construct a formula that will allow me to find the average of a nonsequential range of values, given the value in the cell to their immediate left is 1 and not 2 (where 1 rep...
- Sep 06, 2021
Press the Ctrl + Shift + Enter keys simultaneously
=AVERAGE(IF(A2:H2=1,OFFSET(A2:H2,0,1),""))
SergeiBaklan
Sep 06, 2021Diamond Contributor
You may use AVERAGEIF function (microsoft.com)
- Noths760Sep 06, 2021Copper Contributor...
- SergeiBaklanSep 06, 2021Diamond Contributor
As variant
=SUMPRODUCT(ISODD(COLUMN(A2:G2))*(A2:G2=1)*B2:H2) / SUMPRODUCT(ISODD(COLUMN(A2:G2))*(A2:G2=1))
- Juliano-PetrukioSep 06, 2021Bronze Contributor
Press the Ctrl + Shift + Enter keys simultaneously
=AVERAGE(IF(A2:H2=1,OFFSET(A2:H2,0,1),""))
- Noths760Sep 13, 2021Copper ContributorThank you so much - this worked nicely.