Ignoring cells in a countif formula

TheNeighbour

New Member
Joined
Dec 7, 2022
Messages
2
Hey!
I am trying to see percentage of "true" cells in a column, but I want to ignore a few rows/cells along the way. Like for example I want to see which in the following are true (B67:B74) but NOT count with (B71:B72).

Before excluding B71:B72 I am using =(Countif(B67:B74,True)/COUNTA(B67:B74)), which gives the result I want with a percentage changing as I tick or untick a cell for true/false.

Then I've experimented and realized that =(COUNTIF(AND(B67:B69,B72:B74), True)/Counta(AND(B67:B69,B72:B74))) works fairly fine in the first step of avoiding B70 & B71, but then it doesn't calculate the percentages of the resuming cells' "true".

Could someone help me with what the formula should look like for this issue?
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Try using this formula =(COUNTIF(B67:B74, TRUE) + COUNTIF(B72:B74, TRUE))/(COUNTA(B67:B74) + COUNTA(B72:B74))
 
Upvote 0
= sum of true (whole range)- sum of true (excl. range)
then divide to
rows count (whole range)- rows count (excl. range)

Then should be:

Code:
=(SUMPRODUCT(--B67:B74)-SUMPRODUCT(--B70:B71))/(ROWS(B67:B74)-ROWS(B70:B71))
 
Upvote 0
Thank you both! Versonol's formula =(COUNTIF(B67:B69, TRUE) + COUNTIF(B72:B74, TRUE))/(COUNTA(B67:B69) + COUNTA(B72:B74)) got the result I was looking for, so I will stick to this one!

Have a good one!
 
Upvote 0

Forum statistics

Threads
1,214,973
Messages
6,122,534
Members
449,088
Latest member
RandomExceller01

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