Hi Team,
Need your help , I am trying to use countif formula on array value, but its not working.
MsgBox WorksheetFunction.CountIf(arr, "Completed") Why this line not working.
MsgBox WorksheetFunction.CountA(arr) this line gives result.
Sub Test()
Dim arr As Variant
arr = Range("A2:a30").Value
Range("b5").FormulaR1C1 = "=COUNTIF(R2C1:R30C1,""Completed"")" ' This line works.
MsgBox WorksheetFunction.CountIf(arr, "Completed") not working
End Sub
Thanks
mg
Need your help , I am trying to use countif formula on array value, but its not working.
MsgBox WorksheetFunction.CountIf(arr, "Completed") Why this line not working.
MsgBox WorksheetFunction.CountA(arr) this line gives result.
Sub Test()
Dim arr As Variant
arr = Range("A2:a30").Value
Range("b5").FormulaR1C1 = "=COUNTIF(R2C1:R30C1,""Completed"")" ' This line works.
MsgBox WorksheetFunction.CountIf(arr, "Completed") not working
End Sub
Thanks
mg