thanks for the help.
If I wanted to move this to vba code. I would think something like this
would work.
However, I get an object does not support this method.
Any ideas on moving to VBA?
Sub test()
Dim x
x = Excel.WorksheetFunction.SumProduct(--(Excel.ActiveWorkbook("Range1") =
"ABC"), --(Excel.ActiveWorkbook("Range2") = "DEF"),
Excel.ActiveWorkbook("Range3"))
End Sub
"Bob Phillips" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> =SUMPRODUCT(--(Range1="ABC"),--(Range2="DEF"),Range3)
>
> --
> __________________________________
> HTH
>
> Bob
>
> "greg" <(E-Mail Removed)> wrote in message
> news:%23caV$(E-Mail Removed)...
>> Hello,
>> I would like to sum some numbers. But depending on 2 other column.
>> Say I have 3 named ranges.
>> the A column, B column and c column. = Range1, Range2, Range3
>>
>> Range3 (column C) has numbers. Range 1, 2 are strings.
>>
>> If I wanted to sum numbers in Range3 when Range1 = "ABC" and Range2 =
>> "DEF"
>>
>> do you use Sum (Range1="ABC....
>> Or do I need If statments?
>>
>> thanks for any help
>>
>
>
|