ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help with VBA and Counting Conditionally Formatted Cells (https://www.excelbanter.com/excel-programming/451291-help-vba-counting-conditionally-formatted-cells.html)

Munster

Help with VBA and Counting Conditionally Formatted Cells
 
I am trying to count conditionally formatted cells based on how many times specific colors appear between a set amount of cells and rows. I am very new to VBA and Macros and all my research has shown that I will need VBA code to accomplish this and plan on trying to find resources to understand the code instead of just trying to ask someone what the code is but until then....assuming VBA is the only way to go, what would the code be?

-The condition is, if a range 3-10 appears in the cell then it turns red. If a range of 2-1 appears in the cell it turns blue. If a 0 appears then it turns green.

What I am trying to figure out how to do is make the code that will count how many times the conditionally formatting result of being red is appearing between cells A4:E4.

A B C D E
1 3 2 1 0 2

2 1 0 3 1 1

3 2 5 1 3 3

4 1 9 2 2 2

5 1 3 3 3 2




Claus Busch

Help with VBA and Counting Conditionally Formatted Cells
 
Hi,

Am Sat, 6 Feb 2016 12:11:29 -0800 (PST) schrieb Munster:

I am trying to count conditionally formatted cells based on how many times specific colors appear between a set amount of cells and rows. I am very new to VBA and Macros and all my research has shown that I will need VBA code to accomplish this and plan on trying to find resources to understand the code instead of just trying to ask someone what the code is but until then...assuming VBA is the only way to go, what would the code be?

-The condition is, if a range 3-10 appears in the cell then it turns red. If a range of 2-1 appears in the cell it turns blue. If a 0 appears then it turns green.

What I am trying to figure out how to do is make the code that will count how many times the conditionally formatting result of being red is appearing between cells A4:E4.

A B C D E
1 3 2 1 0 2

2 1 0 3 1 1

3 2 5 1 3 3

4 1 9 2 2 2

5 1 3 3 3 2


use COUNTIF formula with the conditions of CF


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional


All times are GMT +1. The time now is 08:25 PM.

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