Thread
:
COUNTIF in VBA
View Single Post
#
3
Posted to microsoft.public.excel.programming
Tom Ogilvy
external usenet poster
Posts: 27,285
COUNTIF in VBA
Dim MyData As Range
Dim MyResult As Range
Set MyData = Range("D4:D14")
Set MyResult = Range("D16")
MyResult.Select
Selection.Formula = "=COUNTIF(" _
MyData.Address & ",""*less*"")"
--
Regards,
Tom Ogilvy
"Wim VL" <Wim
wrote in message
...
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.
Reply With Quote
Tom Ogilvy
View Public Profile
Find all posts by Tom Ogilvy