ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   counting cells based on conditional formatting (https://www.excelbanter.com/excel-discussion-misc-queries/97617-counting-cells-based-conditional-formatting.html)

Marc

counting cells based on conditional formatting
 
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

Marcelo

counting cells based on conditional formatting
 
Hi Marc,

http://www.cpearson.com/excel/CFColors.htm

use the Chip Person tips.

hth
regards from Brazil
Marcelo

"Marc" escreveu:

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


Gord Dibben

counting cells based on conditional formatting
 
See Chip Pearson's site for code dealing with CF coloring.

http://www.cpearson.com/excel/CFColors.htm


Gord Dibben MS Excel MVP

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



Ron Rosenfeld

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


All times are GMT +1. The time now is 05:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com