Thread
:
VB + array formulas
View Single Post
#
5
Posted to microsoft.public.excel.programming
Dick Kusleika[_4_]
external usenet poster
Posts: 595
VB + array formulas
On 26 Mar 2007 06:56:24 -0700,
wrote:
On Mar 21, 7:56 pm, Divakar wrote:
Dim the vairable Cnt as Double
cnt=ActiveSheet.Evaluate ("SUM(IF('Data'!$K$7:$K
$259<""Cancelled"")*(Data'!$K$7:$K$259<""Reject ""),1,0)")
cnt =
ActiveSheet.Evaluate("SUM(IF(('Data'!$K$7:$K$259< ""Cancelled"")*('Data'!$K$7:$K$259<""Reject""),1, 0))")
--
I get the same error even after changing the data type to double
VB
will happily convert the result into an Integer, unless it's greater than
32,767 or it's an error. Excel reads and writes cell values as Doubles, so
you could eliminate some type conversion, but that's not what's causing your
error. If you haven't already, change your line of code to the one I
provided and it will eliminate the error.
--
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_]