Countif macro codes on multiple criteria

Closed
waseem - Feb 9, 2011 at 08:38 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Feb 9, 2011 at 09:39 AM
Hello,

I need a macro codes with condition applied in formulae. I have a text as below in excel from C1 to C33 and i want a macro to count of "false" in the empty cells in between. Daya by day the columns might change based on data i want to count on the empty cells until there is something in the next column.

FALSE
TRUE
TRUE
FALSE
TRUE

TRUE
FALSE
FALSE
FALSE
FALSE
TRUE
TRUE

FALSE
FALSE
TRUE
TRUE
TRUE
FALSE

TRUE
TRUE

FALSE

TRUE
FALSE
TRUE

FALSE
FALSE
FALSE


Could someone pelase help me out with the codes.

Codes which i used is counting each 5 rows. For me the cells might change based on daily data.



Range("c1").Select

Do

If ActiveCell.Value = "" Then

ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2]C:R[-1]C,""false"")"

Else
ActiveCell.Offset(1, 0).Select
End If
Loop

Could someone please help me out with the exact formula codes.

1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Feb 9, 2011 at 09:39 AM
Could you please upload a sample EXCEL file WITH sample data, macro, formula , conditional formatting etc on some shared site like https://authentification.site , http://docs.google.com, http://wikisend.com/ , http://www.editgrid.com etc
AND post back here the link to allow better understanding of how it is now and how you foresee. Based on the sample book, could you re-explain your problem too.


Note:
your data need not be to be real data but a good representative of how data looks like
0