SyntaxFix
Write A Post
Hire A Developer
Questions
Do you mean you want to use a formula in VBA? Something like:
Dim iVal As Integer iVal = Application.WorksheetFunction.COUNTIF(Range("A1:A10"),"Green")
should work.