COUNTIF in VBA
Why does this (part of a) macro not work? Who can help me to find a solution?
Dim MyData As Range
Dim MyResult As Range
Set MyData = Range("D4:D14")
Set MyResult = Range("D16")
MyResult.Select
Selection.Formula = "=COUNTIF(MyData,""*less*"")"
'This one does not work.It doesn't recognize "MyData" as a range.
"MyData" appears as 'text' in the Excelsheet.
|