I'm looking to use a countif function on a selection of cells. My code is:
Range("A2").Formula = "=COUNTIF(& Selection.Address &, " >= "&B3)"
and it returns "True" after I run the macro, when I want the actual count. (Let's assume D7:D184 is my selection address, and B3 contains the criteria value) I can type:
=COUNTIF(D7:D184, ">="&B3)
into the Excel spreadsheet, and it returns the actual count. What am I not understanding, and how can I make my VBA code return an integer instead of "TRUE"?
I appreciate the help.
Bookmarks