Thread: Nesting SUMIF
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips[_4_] Bob Phillips[_4_] is offline
external usenet poster
 
Posts: 834
Default Nesting SUMIF

Try

StatsForm.TextBox9 = Application.Evaluate("SUMPRODUCT(" & _
"(" & planDataSheet.Range("K2:K" & Endrow).Address(, , ,
True) & "=""""SFD"")*" & _
"(" & planDataSheet.Range("AT2:AT" & Endrow).Address(, ,
, True) & "=Quarter)*" & _
"(" & planDataSheet.Range("V2:V" & Endrow).Address(, , ,
True) & ")")

HTH

Bob


"RussellT" wrote in message
...
I want to sum number in Column V if two conditions are met.
Condition 1: Data in Column K = SFD
Condition 2: Data in Column AT = value in cell H2 on another Sheet.

Dim Quarter As String
Quarter = filtercontrolSheet.Range("H2") contents of cell is 2009/4

I've tried the formula but get error message "Invalid number of arguments"
Thanks for the assistance.

StatsForm.TextBox9 = Application.SumIf(planDataSheet.Range("K2:K" &
Endrow),
"SFD" And planDataSheet.Range("AT2:AT" & Endrow), Quarter,
planDataSheet.Range("V2:V" & Endrow))

I've also tried replacing the And joiner with * to no avail.