View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default counting cells based on conditional formatting

On Wed, 5 Jul 2006 11:01:01 -0700, Marc wrote:

hello -

I've conditionally formatted a column of cells to a yellow background based
on the sum of 5 other cells in the row.

Now I want to count the number of yellow cells. I don't know VB, so if
someone knows a formula method to count the cells, that would be great.

Thanks,

Marc


You'll need to incorporate in your Counting formula the same formula you use in
the conditional format.

For example, if the yellow background appears if E1 < SUM(A1:D1) then one
approach would be to set up a helper column with that formula in it.

For example:

F1: =E1<SUM(A1:D1)

Then copy/drag that down and COUNT the number of TRUE's

=COUNTIF(F1:F12,TRUE)


--ron