Forum Discussion
DanW1648
Mar 09, 2022Copper Contributor
How should this formula be put together? I need to countif & divide sum+sum on condition in header
How should this formula be put together? I have the following formula that I need help with, I need it to count cells with a 1 then divide by the cells with a 1 + cells with a 0 & that works but now...
- Mar 09, 2022I'm not sure if the MONDAY condition is only on the numerator or all cases but basically you should be able to use COUNTIFS()
=IFERROR(COUNTIFS($B$2:$GY$2,1,$B$1:$GY$1,"*Monday*")/(COUNTIFS($B$2:$GY$2,1,$B$1:$GY$1,"*Monday*")+COUNTIFS($B$2:$GY$2,0,$B$1:$GY$1,"*Monday*")),NA())
mtarler
Mar 09, 2022Silver Contributor
I'm not sure if the MONDAY condition is only on the numerator or all cases but basically you should be able to use COUNTIFS()
=IFERROR(COUNTIFS($B$2:$GY$2,1,$B$1:$GY$1,"*Monday*")/(COUNTIFS($B$2:$GY$2,1,$B$1:$GY$1,"*Monday*")+COUNTIFS($B$2:$GY$2,0,$B$1:$GY$1,"*Monday*")),NA())
=IFERROR(COUNTIFS($B$2:$GY$2,1,$B$1:$GY$1,"*Monday*")/(COUNTIFS($B$2:$GY$2,1,$B$1:$GY$1,"*Monday*")+COUNTIFS($B$2:$GY$2,0,$B$1:$GY$1,"*Monday*")),NA())
DanW1648
Mar 09, 2022Copper Contributor
Thank you, I was trying that but I was missing the ) after the "*Monday*", Thank you again, it works perfectly now.