Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=SUMPRODUCT(--(Range1="ABC"),--(Range2="DEF"),Range3)
-- __________________________________ HTH Bob "greg" wrote in message ... 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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" wrote in message ... =SUMPRODUCT(--(Range1="ABC"),--(Range2="DEF"),Range3) -- __________________________________ HTH Bob "greg" wrote in message ... 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
this is an array formula, so press Ctrl+Shift+Enter after pasting it into a
cell =SUM((A1:A10="ABC")*(B1:B10="DEF")*C1:C10) "greg" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
v look value dependant on 2 cells | Excel Discussion (Misc queries) | |||
3 way dependant lists | Excel Worksheet Functions | |||
Dependant Lists | Excel Discussion (Misc queries) | |||
Dependant Combobox | Excel Programming | |||
second combo box will be dependant | Excel Programming |