# Arrayformula: COUNTIF / COUNTIFS

=COUNTIF(Singles!\$B\$2:\$C\$74,A2)+COUNTIF(Doubles!\$B\$2:\$F\$96,A2)

Would like to have the above in an ARRAYFORMULA but it does not copy down the column as needed. The goal is to show total games played, whether in singles or doubles. I have tested various means, but nothing working in an array formula.

(Singles Tab)
B Col - Home Player
C Col = Away Player

(Doubles Tab)
C Col - Home Player 1
D Col = Away Player 1
E Col - Home Player 2
F Col = Away Player 2

When you had it in an arrayformula, did you have A2:A in place of A2? That should make it work with COUNTIF. I donâ€™t believe COUNTIFS is compatible with arrayformulas.

1 Like

I think you can keep this in Glide Editor, make a multiple relation to singles tab using the playerâ€™s email, then return the total count using a rollup. Do the same for the doubles, then use a math to sum the two rollups.

1 Like

I agree with @ThinhDinh, This could be done in glide and would work much better.

1 Like

Not sure if you are still interested but I was looking for something similarâ€¦

``````={"totalGameCount";arrayformula(if(isblank(A2:A),"",COUNTIF(Singles!\$B\$2:\$C,A2:A)+COUNTIF(Doubles!\$B\$2:\$F,A2:A)))}