View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Martin[_21_] Martin[_21_] is offline
external usenet poster
 
Posts: 50
Default Sumproduct in UDF

Dear All,

Excel 2000.

I cannot get the following UDF to work - it comes out as #VALUE!.

Code is entered as numbers, ex: 230
Job is entered as text, ex: Manager
Country is entered as text, ex: England
Rng1, Rng2, Rng3 and Rng4 are named ranges

Function Function_Name(Code As Integer, Job As Boolean, Country As Boolean)

Function_Name = SumProduct(--(Rng1 = Code), --(Rng2 = Job), --(Rng3 =
Country), (Rng4))

End Function

Help much appreciated.

--
Regards,

Martin