View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein \(MVP - VB\) Rick Rothstein \(MVP - VB\) is offline
external usenet poster
 
Posts: 2,202
Default COUNT CELLS WITH CONDITIONAL FORMATTING

Hi. I must have missed a function somewhere. I have a range of numbers
that
have conditional formatting based on matching an input value. What I would
like to do is count the cells that are conditionally formatted. I tried
the
count functions but cannot find an argument to identify formatting
differences.


Why not use the same condition that you used in the conditional format in a
SUMPRODUCT to count the cells. For example, if your conditional format is
based on cells, say for example, A1:A200 matching an input value in, say,
B1, then use this...

=SUMPRODUCT(--(A1:A200=B1))

or, depending on what your conditional actually is, something similar to the
above. The point is, you don't have to search the range for the conditional
formatting you set, just search for the cells that match the conditions you
set in the Conditional Formatting... if that condition was sufficient to set
the format, then it should be sufficient to be counted.

Rick