View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] cugmac@gmail.com is offline
external usenet poster
 
Posts: 1
Default VB + array formulas

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.

Thanks in Advance