View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Andibevan[_4_] Andibevan[_4_] is offline
external usenet poster
 
Posts: 103
Default Problem with Evaluate

Hi All,

I am having problems constructing a complex evaluate formula that I am using
within a user defined function:-


This formula works fine:-
Evaluate("SUMPRODUCT((" & strTask_Type & " = " & ColType & ")*(" &
strTask_DCIT & "))")

This also works:-
EvalSTR = ("SUMPRODUCT((" & str_Date & "=" & strTask_Start & ")" & "*(" &
str_Date & "<=" & strTask_Finish & "))")

But when I try to combine the 2 I get a Value# error:-
EvalSTR = ("SUMPRODUCT((" & str_Date & "=" & strTask_Start & ")" & "*(" &
str_Date & "<=" & strTask_Finish & ")*" & "(""" & ColType & """=" &
strTask_Type & ")*(" & strTask_DCIT & "))")

I can't see what's wrong....

Any ideas

Ta

Andi