ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Just a quick thank (https://www.excelbanter.com/excel-programming/379145-just-quick-thank.html)

[email protected]

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)


Dave Peterson

Just a quick thank
 
Thank goodness for google!

wrote:

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)


--

Dave Peterson


All times are GMT +1. The time now is 06:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com