Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks, this seems to work when I have two cells I need to work with. But as
I stated in my original post, my real world problem has 11 different cells I need to work with, and I may change the number of cells I'm working with or what they contain. I'm wondering if I need to write out a long complicated piece of code to accomplish this task, or if there's an easier way? Thanks! "Toppers" wrote: =SUMPRODUCT((A1=B1:B20)*(C1:C20)+(A2=B1:B20)*(C1:C 20)) =SUMPRODUCT((($A1=$B$1:$B$20)+($A2=$B$1:$B$20))*($ C$1:$C$20)) "Kristopher" wrote: Cell A1 has the text "apples" and cell A2 has "oranges". Cells B1:B20 have the text names of many different fruits, including apples and oranges. Cells C1:C20 have the prices I paid for each of the different fruits in B1:B20. I want to add all of the amounts I paid for the apples AND oranges. SUMIF(B1:B20, A1:A2, C1:C20) doesn't work because SUMIF won't accept a range for the criteria - I can get a sum for one criteria (apples OR oranges), but not both. My real world application of this problem uses 11 different criteria instead of just two. The criteria may change depending on what text is in the cells, so I'd really like to just point to the cells these criteria are in and ask Excel to see if my range matches any of those criteria, not just one of them. Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
help with sumif formula with multiple critera | Excel Worksheet Functions | |||
SUMIF when using a range with critera | Excel Discussion (Misc queries) | |||
SUMIF when using a range with critera | Excel Discussion (Misc queries) | |||
How do I sum with two critera? | Excel Discussion (Misc queries) | |||
SUMIF - Range name to used for the "sum_range" portion of a SUMIF function | Excel Worksheet Functions |