Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,069
Default SUMIF when using a range with critera

try =SUMPRODUCT(--(B1:B20=A1),C1:C20)+SUMPRODUCT(--(B1:B20=A2),C1:C20)
--
John
MOS Master Instructor Office 2000, 2002 & 2003
Please reply & rate any replies you get

Ice Hockey rules (especially the Wightlink Raiders)


"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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
help with sumif formula with multiple critera Matt Excel Worksheet Functions 4 October 13th 07 06:56 PM
vlookup/match 2 critera Wannano Excel Discussion (Misc queries) 2 January 3rd 07 08:09 PM
Average only with specific critera Stephen Excel Discussion (Misc queries) 8 May 19th 06 06:06 PM
How do I sum with two critera? Clare Excel Discussion (Misc queries) 4 August 24th 05 03:05 PM
SUMIF - Range name to used for the "sum_range" portion of a SUMIF function Oscar Excel Worksheet Functions 2 January 11th 05 11:01 PM


All times are GMT +1. The time now is 08:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"