How to Use COUNTIF to Count Non Empty Cells in Excel
Sub CountNonBlank()
Cells.Clear
Range("A1:A7") = Application.Transpose(Array("A", "B", "C", "D", "E", "", ""))
Range("A10").Formula = "=COUNTIF(A1:A7,""<>"""""")" ' Rong result
Range("A12").Formula =...