Thread
:
VB + array formulas
View Single Post
#
2
Posted to microsoft.public.excel.programming
Dick Kusleika[_4_]
external usenet poster
Posts: 595
VB + array formulas
On 21 Mar 2007 13:09:38 -0700,
wrote:
I have the following
VB
code
Dim cnt as Integer
ActiveSheet.Evaluate ("SUM(IF('Data'!$K$7:$K
$259<""Cancelled"")*(Data'!$K$7:$K$259<""Reject ""),1,0)")
The above code works fine but when I add the following line
cnt=ActiveSheet.Evaluate ("SUM(IF('Data'!$K$7:$K
$259<""Cancelled"")*(Data'!$K$7:$K$259<""Reject ""),1,0)")
I get a type mismatch error.
The formula is returning an error and can't fit into an Integer data type.
cnt =
ActiveSheet.Evaluate("SUM(IF(('Data'!$K$7:$K$259< ""Cancelled"")*('Data'!$K$7:$K$259<""Reject""),1, 0))")
--
Dick Kusleika
Microsoft MVP-Excel
http://www.dailydoseofexcel.com
Reply With Quote
Dick Kusleika[_4_]
View Public Profile
Find all posts by Dick Kusleika[_4_]