Just a quick thank

R

rumkus

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>)
 
D

Dave Peterson

Thank goodness for google!

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>)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top