Forum Discussion
abhinair
Apr 06, 2023Copper Contributor
COUNTIFS Help Needed
Hi, I am using the COUNTIFS formula below but running into #VALUE! error =COUNTIFS('Raw Data'!$A:$A,'Composite by Relation'!$A2,'Raw Data'!$E:$T,">0",'Raw Data'!$D:$D,C2) Use Case: I have 2...
- Apr 07, 2023
Obtaining the average using only the IFS family of functions would be more convoluted:
=LET( α,'RawData'!$A:$A, β,'RawData'!$D:$D, γ,OFFSET('RawData'!$E:$E,,SEQUENCE(,COLUMNS('RawData'!$E:$T),0)), SUM(SUMIFS(γ,γ,">0",α,$A2,β,C2))/SUM(COUNTIFS(α,$A2,γ,">0",β,C2)) )I'd prefer:
=AVERAGE( IF('RawData'!$A2:$A100=$A2, IF('RawData'!$D2:$D100=C2, IF('RawData'!$E2:$T100>0,'RawData'!$E2:$T100) ) ) )keeping the end row reference to a suitably low upper bound.
Regards
JosWoolley
Apr 07, 2023Iron Contributor
Obtaining the average using only the IFS family of functions would be more convoluted:
=LET(
α,'RawData'!$A:$A,
β,'RawData'!$D:$D,
γ,OFFSET('RawData'!$E:$E,,SEQUENCE(,COLUMNS('RawData'!$E:$T),0)),
SUM(SUMIFS(γ,γ,">0",α,$A2,β,C2))/SUM(COUNTIFS(α,$A2,γ,">0",β,C2))
)
I'd prefer:
=AVERAGE(
IF('RawData'!$A2:$A100=$A2,
IF('RawData'!$D2:$D100=C2,
IF('RawData'!$E2:$T100>0,'RawData'!$E2:$T100)
)
)
)
keeping the end row reference to a suitably low upper bound.
Regards
abhinair
Apr 11, 2023Copper Contributor
JosWoolley That really helped. Thanks so much for your help on this one!