Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello all,
I am looking to have code once a macro runs to be able the do a count on the conditional formatting the was triggered on a tab. So condition1 states turn red if the cell value is greater than 30. After a macro runs a msgbox states there are 33 counts of condition1 on sheet1 tab. Thanks, Aaron |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Aaron
Do you really need a macro ? Why not just a COUNTIF ? =COUNTIF(B:IV,"30") anywhere in column A or =COUNTIF(A2:A65536,"30")+COUNTIF(B:IV,"30") in cell A1 But, if you must: Sub CountGT30_1() MsgBox WorksheetFunction.CountIf(Range("A:IV"), "30") End Sub Sub CountGT30_2() MsgBox WorksheetFunction.CountIf(Cells, "30") End Sub Sub CountGT30_3() MsgBox WorksheetFunction.CountIf(Columns("A:IV"), "30") End Sub Sub CountGT30_4() MsgBox WorksheetFunction.CountIf(Rows("1:65536"), "30") End Sub Regards Trevor "Aaron" wrote in message ... Hello all, I am looking to have code once a macro runs to be able the do a count on the conditional formatting the was triggered on a tab. So condition1 states turn red if the cell value is greater than 30. After a macro runs a msgbox states there are 33 counts of condition1 on sheet1 tab. Thanks, Aaron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
COUNT IF - Conditional Formatting | Excel Discussion (Misc queries) | |||
COUNT CELLS WITH CONDITIONAL FORMATTING | Excel Worksheet Functions | |||
Count conditional formatting | Excel Programming | |||
Count and Sum with Conditional Formatting Problem | Excel Worksheet Functions | |||
Count Conditional Formatting | Excel Programming |