#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default sumif

If I have two column as below:
(ColumnA) (Column B)
1. Apple 35
2. Orange 5
3. Banana 9
4. Pear 25
5. Banana 18
6. Apple 56
7. Orange 36
8. watermelon 66
9. Orange 14
10.Apple 5
If I use SumIf like this =SUMIF(A1:A5,"Banana",B1:B5), it only come up 18+9
= 27.
How can I sum up more than two items in the ColumA, like sum up "Pear" +
"Apple" +"Orange" together.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default sumif

You could use multiple =sumif()'s:

=SUMIF(A1:A5,"apple",B1:B5)
+SUMIF(A1:A5,"pear",B1:B5)
+SUMIF(A1:A5,"orange",B1:B5)

Or you could use something like:
=sum(SUMIF(A1:A5,{"apple","pear","orange"},B1:B5))

Adjust your range...I bet it doesn't stop with row 5.



sumif wrote:

If I have two column as below:
(ColumnA) (Column B)
1. Apple 35
2. Orange 5
3. Banana 9
4. Pear 25
5. Banana 18
6. Apple 56
7. Orange 36
8. watermelon 66
9. Orange 14
10.Apple 5
If I use SumIf like this =SUMIF(A1:A5,"Banana",B1:B5), it only come up 18+9
= 27.
How can I sum up more than two items in the ColumA, like sum up "Pear" +
"Apple" +"Orange" together.


--

Dave Peterson
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
sumif for multi conditions. i.e sumif(A1:A10,"Jon" and B1:B10,"A" Harry Seymour Excel Worksheet Functions 9 June 12th 07 10:47 PM
Embedding a Sumif in a sumif C.Pflugrath Excel Worksheet Functions 5 August 31st 05 07:31 PM
SUMIF Dahlman Excel Discussion (Misc queries) 1 June 9th 05 08:40 PM
nested sumif or sumif with two criteria dshigley Excel Worksheet Functions 5 April 5th 05 03:34 AM
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 12:42 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"