LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #14   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default SUMIF with multiple criteria

Hi,

Try this

=SUMPRODUCT((A20:A29=A20)+(A20:A29=A23),B20:B29)

A20 holds Apples and A23 holds oranges

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"RollieG" wrote in message
...
Instead of {"apples","oranges"} for criteria, can you use something like
{$C$1, $D$1} ? I am trying to use the criteria to refer to one of two
values,
where the values in the cells are strings.

"Dave Peterson" wrote:

One mo
=SUM(SUMIF(A1:A10,{"apples","oranges"},B1:B10))



Nan wrote:

I'm trying to set up a criteria range using SUMIF.

ColA ColB
apples 1
carrots 2
apples 5
oranges 1
celery 2
apples 1
onions 2
apples 5
oranges 1
celery 2

I hoped something like =SUMIF(A1:A10,(OR("apples","oranges")),B1:B10)
would
work, but the result is 0, not 14. Any help is appreciated.
--
TIA, Nan


--

Dave Peterson

 
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
SUMIF multiple criteria Sarah (OGI) Excel Worksheet Functions 5 September 26th 07 02:54 PM
SumIf with Multiple Criteria DEE Excel Worksheet Functions 4 November 21st 06 10:04 PM
SUMIF for Multiple Criteria PCakes Excel Worksheet Functions 2 October 20th 06 05:53 PM
sumif for multiple criteria Inter Excel Discussion (Misc queries) 3 May 17th 06 07:17 PM
SUMIF multiple criteria HLS Excel Discussion (Misc queries) 5 March 24th 06 03:43 PM


All times are GMT +1. The time now is 10:20 PM.

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

About Us

"It's about Microsoft Excel"