View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] rumkus@hotmail.com is offline
external usenet poster
 
Posts: 22
Default Just a quick thank

Been on my Sumproduct syntax problem for nearly 3 hours till I hit
below.(Jan 8 2005 4:08 am )

Thank you very much Dave.


Sub testIt2()
Dim rng1 As Range, Rng2 As Range, Rng3 As Range
Set rng1 = ActiveSheet.Range("a1:a12")
Set Rng2 = Workbooks("book4").Sheets("sheet1").Range("b1:b12" )
Set Rng3 = ActiveWorkbook.Sheets("sheet3").Range("c1:c12")
MsgBox Evaluate("SUM((" & rng1.Address(external:=True) & "=""f"")"
_
& "*(" & Rng2.Address(external:=True) &
"=""cls"")" _
& "*" & Rng3.Address(external:=True) & ")")
End Sub
(With the sub/end sub lined up! <vbg)