Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default sumif function in excel for multiple conditions instead of one

I have 3 columns of data. I need to sum the 3rd column(i.e. sum range) if
conditions are met in the first 2 columns. An example would be this. Column
1,2,3 are the type of music(jazz,pop, blues etc), media(cd, dvd,casette) and
Profit respectively.
How to i write the function or is there another function i could use in
excel for adding up the Profit(column 3) for if the music type is jazz(column
1) and cd(column2). The sumif function only allows you to specify 1
condition. ie. if the music type is jazz, then sum the profit. Please advise,
your help would be very much appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default sumif function in excel for multiple conditions instead of one

Try this:

If
A2:A20 contains Music
B2:B20 contains Media
C2:C20 contains Profit

D1: Jazz
E1: CD

This formula returns the total profit for that combination:
=SUMPRODUCT((A2:A20=E1)*(B2:B20=F1)*C2:C20)

and this is an alternative SUMPRODUCT structu
=SUMPRODUCT(--(A2:A20=E1),--(B2:B20=F1),C2:C20)

Mostly, they return the same value, but sometimes one works
where the other fails.

Is that something you can work with?
Post back if you have more questions.
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)

"curious44" wrote in message
...
I have 3 columns of data. I need to sum the 3rd column(i.e. sum range) if
conditions are met in the first 2 columns. An example would be this.
Column
1,2,3 are the type of music(jazz,pop, blues etc), media(cd, dvd,casette)
and
Profit respectively.
How to i write the function or is there another function i could use in
excel for adding up the Profit(column 3) for if the music type is
jazz(column
1) and cd(column2). The sumif function only allows you to specify 1
condition. ie. if the music type is jazz, then sum the profit. Please
advise,
your help would be very much appreciated.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default sumif function in excel for multiple conditions instead of one

Typos...sorry
D1: Jazz
E1: CD


should be:
E1: Jazz
F1: CD

....so the formulas can work.

--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)


"Ron Coderre" wrote in message
...
Try this:

If
A2:A20 contains Music
B2:B20 contains Media
C2:C20 contains Profit

D1: Jazz
E1: CD

This formula returns the total profit for that combination:
=SUMPRODUCT((A2:A20=E1)*(B2:B20=F1)*C2:C20)

and this is an alternative SUMPRODUCT structu
=SUMPRODUCT(--(A2:A20=E1),--(B2:B20=F1),C2:C20)

Mostly, they return the same value, but sometimes one works
where the other fails.

Is that something you can work with?
Post back if you have more questions.
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)

"curious44" wrote in message
...
I have 3 columns of data. I need to sum the 3rd column(i.e. sum range) if
conditions are met in the first 2 columns. An example would be this.
Column
1,2,3 are the type of music(jazz,pop, blues etc), media(cd, dvd,casette)
and
Profit respectively.
How to i write the function or is there another function i could use in
excel for adding up the Profit(column 3) for if the music type is
jazz(column
1) and cd(column2). The sumif function only allows you to specify 1
condition. ie. if the music type is jazz, then sum the profit. Please
advise,
your help would be very much appreciated.





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 with Multiple Conditions TexJen09 Excel Worksheet Functions 5 March 17th 08 03:39 AM
Using SUMIF/IF statements for multiple conditions mishmash Excel Worksheet Functions 5 April 18th 07 10:10 AM
sumif with multiple conditions Slax Excel Worksheet Functions 5 April 12th 06 10:27 PM
sumif with multiple conditions Ray Excel Worksheet Functions 8 September 23rd 05 12:20 AM
sumif - multiple conditions J_Barn Excel Worksheet Functions 4 June 28th 05 11:55 PM


All times are GMT +1. The time now is 05:08 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"