#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default SUMIF WITH OR

I have a table with 3 columns of data - Column A Store Number, Column B Dept
& Column C Amount. There are several store numbers and 10 distinct Depts
(Dept A - J. I want a sum of amounts where store# = 1 and dept is Dept A,
Dept B and Dept C.

Any help will be greatly appreciated.

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 694
Default SUMIF WITH OR

Hi Lea
This should do it, its a bit long but it works;
=SUMPRODUCT(--(A2:A21="Store 1"),--(B2:B21="Dept
A"),(C2:C21))+SUMPRODUCT(--(A2:A21="Store 1"),--(B2:B21="Dept
B"),(C2:C21)+SUMPRODUCT(--(A2:A21="Store 1"),--(B2:B21="Dept C"),(C2:C21)))
This formula goes all in one cell, adjust range to your needs and make sure that
the Store and Dept are exactly spelled the same way as what's in your table.
HTH
John
"Lea from CA" wrote in message
...
I have a table with 3 columns of data - Column A Store Number, Column B Dept
& Column C Amount. There are several store numbers and 10 distinct Depts
(Dept A - J. I want a sum of amounts where store# = 1 and dept is Dept A,
Dept B and Dept C.

Any help will be greatly appreciated.

Thanks!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default SUMIF WITH OR

One way...

=SUMPRODUCT((A1:A20=1)*(B1:B20={"A","B","C"})*C1:C 20)

--
Biff
Microsoft Excel MVP


"Lea from CA" wrote in message
...
I have a table with 3 columns of data - Column A Store Number, Column B
Dept
& Column C Amount. There are several store numbers and 10 distinct Depts
(Dept A - J. I want a sum of amounts where store# = 1 and dept is Dept A,
Dept B and Dept C.

Any help will be greatly appreciated.

Thanks!



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 694
Default SUMIF WITH OR

Hi Biff
Great shut,I forgot, they could be group that way, makes it much neater.
Have a good evening.
John
"T. Valko" wrote in message
...
One way...

=SUMPRODUCT((A1:A20=1)*(B1:B20={"A","B","C"})*C1:C 20)

--
Biff
Microsoft Excel MVP


"Lea from CA" wrote in message
...
I have a table with 3 columns of data - Column A Store Number, Column B Dept
& Column C Amount. There are several store numbers and 10 distinct Depts
(Dept A - J. I want a sum of amounts where store# = 1 and dept is Dept A,
Dept B and Dept C.

Any help will be greatly appreciated.

Thanks!




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default SUMIF WITH OR

Works great! Thank you!

"T. Valko" wrote:

One way...

=SUMPRODUCT((A1:A20=1)*(B1:B20={"A","B","C"})*C1:C 20)

--
Biff
Microsoft Excel MVP


"Lea from CA" wrote in message
...
I have a table with 3 columns of data - Column A Store Number, Column B
Dept
& Column C Amount. There are several store numbers and 10 distinct Depts
(Dept A - J. I want a sum of amounts where store# = 1 and dept is Dept A,
Dept B and Dept C.

Any help will be greatly appreciated.

Thanks!



.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default SUMIF WITH OR

Thank you! This works too but like you said the other way is neater!

"John" wrote:

Hi Lea
This should do it, its a bit long but it works;
=SUMPRODUCT(--(A2:A21="Store 1"),--(B2:B21="Dept
A"),(C2:C21))+SUMPRODUCT(--(A2:A21="Store 1"),--(B2:B21="Dept
B"),(C2:C21)+SUMPRODUCT(--(A2:A21="Store 1"),--(B2:B21="Dept C"),(C2:C21)))
This formula goes all in one cell, adjust range to your needs and make sure that
the Store and Dept are exactly spelled the same way as what's in your table.
HTH
John
"Lea from CA" wrote in message
...
I have a table with 3 columns of data - Column A Store Number, Column B Dept
& Column C Amount. There are several store numbers and 10 distinct Depts
(Dept A - J. I want a sum of amounts where store# = 1 and dept is Dept A,
Dept B and Dept C.

Any help will be greatly appreciated.

Thanks!


.

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default SUMIF WITH OR

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Lea from CA" wrote in message
...
Works great! Thank you!

"T. Valko" wrote:

One way...

=SUMPRODUCT((A1:A20=1)*(B1:B20={"A","B","C"})*C1:C 20)

--
Biff
Microsoft Excel MVP


"Lea from CA" wrote in message
...
I have a table with 3 columns of data - Column A Store Number, Column B
Dept
& Column C Amount. There are several store numbers and 10 distinct
Depts
(Dept A - J. I want a sum of amounts where store# = 1 and dept is Dept
A,
Dept B and Dept C.

Any help will be greatly appreciated.

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
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
SUMIF and < Taxed Mind Excel Discussion (Misc queries) 5 February 20th 07 04:00 PM
Embedding a Sumif in a sumif C.Pflugrath Excel Worksheet Functions 5 August 31st 05 07:31 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 07:46 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"