Need some help to understand where I’m going wrong/not understanding the 3rd Count method in my code.
Background info;
My code to date
As a supplementary observation:
MsgBox WorksheetFunction.CountBlank(rng1) ' count returns "1"
MsgBox WorksheetFunction.CountIf(Range("rng1") , "") ' count returns "1"
which I have to assume !!! is the # of Blanks
Background info;
Rich (BB code):
The NamedRange is "MyNamedRangeA" and RefersTo A8:A28
Cells A8:A28 contain Array formula
Cells A8:A27 contain the values of the formula
Cell A28 has NO returned value, just the formula
VBA Code:
Sub MyTest_CountIF()
Dim rng1 As Range
Set rng1 = Range("MyNamedRangeA")
MsgBox WorksheetFunction.CountIf(Range("A8:A28"), "> """) , "") ' count returns "20"
MsgBox WorksheetFunction.CountIf(Range("MyNamedRangeA "), ">""") ' count returns "20"
MsgBox WorksheetFunction.CountIf(Range("rng1"), ">""") ' count returns "0" and NOT expected "20"
End Sub
MsgBox WorksheetFunction.CountBlank(rng1) ' count returns "1"
MsgBox WorksheetFunction.CountIf(Range("rng1") , "") ' count returns "1"
which I have to assume !!! is the # of Blanks