• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

how to count cell that meet conditional formating

mandarp22

Member
Hi

I have a problem in a spreadsheet where there is data in cell A1 to Q7000 and I have some error in some cells and colored it with the help of conditional formatting. Now I want to count the cell that contains error. In short I want to count cells that meet the condition in a range of cells with the conditional formatting.

I am not good at VBA so would appreciate if I could get it through formula.

Thanks
 
Hi,


To count based on a single condition in Excel use the COUNTIF()formula. To count based on multiple conditions use COUNTIFS() (Excel 2007 onwards).


NB The formula will not count based on the fact that the cells have conditional formatting applied but based on the values within the cells.


If you apply the same conditions in the conditional formatting and in the COUNTIFS() formula the two will obviously then match.


Below is a post from Chandoo on COUNTIF():


http://chandoo.org/excel-formulas/countif.html
 
To elabourate slightly, if you use a helper column countaining the ISERROR() formula (which returns TRUE if the cell contains an error) you can then use the COUNTIF() formula to count the cells containing TRUE.
 
Back
Top