A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

SUMIF with 2 conditions



 
 
Thread Tools Display Modes
  #1  
Old January 4th, 2006, 11:30 AM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default SUMIF with 2 conditions


Can anyone help, I have a spreadsheet with 2 sheets, the first sheet
contains the data, the second sheet is a summary page.

Sheet 1 contains 8 colums (a - h), colum f contains price information,
colum g contains the department number and colum h contains the product
code.

What I would like to do on the summary sheet is have a cell where you
can input a deprtment number and then a list of all the product codes
with a formula to work out the price of each of the products for that
deprtment number.

I can work out, with " =SUMIF('Stock Issues'!H:H,A2,'Stock
Issues'!F:F) " the totals for each product code, but is it possible to
add the department condition?


--
1990
------------------------------------------------------------------------
1990's Profile: http://www.excelforum.com/member.php...o&userid=30100
View this thread: http://www.excelforum.com/showthread...hreadid=497851

  #2  
Old January 4th, 2006, 12:09 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default SUMIF with 2 conditions

=SUMPRODUCT(--('Stock Issues'!G2:G200=$A$1),--('Stock
Issues'H2:H200=B1),'Stock Issues'F2:F200)

and copy down, where A1 has the department number, B1:Bn has the product
codes. Note that SUMPRODUCT cannot use whole columns, only a specified
range.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"1990" wrote in message
...

Can anyone help, I have a spreadsheet with 2 sheets, the first sheet
contains the data, the second sheet is a summary page.

Sheet 1 contains 8 colums (a - h), colum f contains price information,
colum g contains the department number and colum h contains the product
code.

What I would like to do on the summary sheet is have a cell where you
can input a deprtment number and then a list of all the product codes
with a formula to work out the price of each of the products for that
deprtment number.

I can work out, with " =SUMIF('Stock Issues'!H:H,A2,'Stock
Issues'!F:F) " the totals for each product code, but is it possible to
add the department condition?


--
1990
------------------------------------------------------------------------
1990's Profile:

http://www.excelforum.com/member.php...o&userid=30100
View this thread: http://www.excelforum.com/showthread...hreadid=497851



  #3  
Old January 4th, 2006, 12:52 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default SUMIF with 2 conditions


Thanks for the reply, but when i copy that in it brings up an error
message and highlights the second 'Stock - highlighted in red here "
=SUMPRODUCT(--('Stock Issues'!G2:G200=B1),--('Stock
Issues'H2:H200=$A$1),'Stock Issues'F2:F200) "


--
1990
------------------------------------------------------------------------
1990's Profile: http://www.excelforum.com/member.php...o&userid=30100
View this thread: http://www.excelforum.com/showthread...hreadid=497851

  #4  
Old January 4th, 2006, 01:08 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default SUMIF with 2 conditions

Maybe wrap-around.

Try copying

=SUMPRODUCT(--('Stock Issues'!G2:G200=$A$1),
--('Stock Issues'H2:H200=B1),'Stock Issues'F2:F200)


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"1990" wrote in message
...

Thanks for the reply, but when i copy that in it brings up an error
message and highlights the second 'Stock - highlighted in red here "
=SUMPRODUCT(--('Stock Issues'!G2:G200=B1),--('Stock
Issues'H2:H200=$A$1),'Stock Issues'F2:F200) "


--
1990
------------------------------------------------------------------------
1990's Profile:

http://www.excelforum.com/member.php...o&userid=30100
View this thread: http://www.excelforum.com/showthread...hreadid=497851



  #5  
Old January 4th, 2006, 01:34 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default SUMIF with 2 conditions


Bob Phillips Wrote:
Maybe wrap-around.

Try copying

=SUMPRODUCT(--('Stock Issues'!G2:G200=$A$1),
--('Stock Issues'H2:H200=B1),'Stock Issues'F2:F200)


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"1990" wrote in
message
...

Thanks for the reply, but when i copy that in it brings up an error
message and highlights the second 'Stock - highlighted in red here

"
=SUMPRODUCT(--('Stock Issues'!G2:G200=B1),--('Stock
Issues'H2:H200=$A$1),'Stock Issues'F2:F200) "


--
1990

------------------------------------------------------------------------
1990's Profile:

http://www.excelforum.com/member.php...o&userid=30100
View this thread:

http://www.excelforum.com/showthread...hreadid=497851



The exclamation points are necessary after *each* reference to a
worksheet.

=SUMPRODUCT(--('Stock Issues'!G2:G200=$A$1),--('Stock
Issues'!H2:H200=B1),'Stock Issues'!F2:F200)


--
Vito
------------------------------------------------------------------------
Vito's Profile: http://www.excelforum.com/member.php...o&userid=29182
View this thread: http://www.excelforum.com/showthread...hreadid=497851

  #6  
Old January 4th, 2006, 01:37 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default SUMIF with 2 conditions

Oops, didn't even notice I had dropped those in the copy.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Vito" wrote in message
...

Bob Phillips Wrote:
Maybe wrap-around.

Try copying

=SUMPRODUCT(--('Stock Issues'!G2:G200=$A$1),
--('Stock Issues'H2:H200=B1),'Stock Issues'F2:F200)


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"1990" wrote in
message
...

Thanks for the reply, but when i copy that in it brings up an error
message and highlights the second 'Stock - highlighted in red here

"
=SUMPRODUCT(--('Stock Issues'!G2:G200=B1),--('Stock
Issues'H2:H200=$A$1),'Stock Issues'F2:F200) "


--
1990

------------------------------------------------------------------------
1990's Profile:

http://www.excelforum.com/member.php...o&userid=30100
View this thread:

http://www.excelforum.com/showthread...hreadid=497851



The exclamation points are necessary after *each* reference to a
worksheet.

=SUMPRODUCT(--('Stock Issues'!G2:G200=$A$1),--('Stock
Issues'!H2:H200=B1),'Stock Issues'!F2:F200)


--
Vito
------------------------------------------------------------------------
Vito's Profile:

http://www.excelforum.com/member.php...o&userid=29182
View this thread: http://www.excelforum.com/showthread...hreadid=497851



  #7  
Old January 4th, 2006, 02:33 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default SUMIF with 2 conditions


Spot on, thanks.


--
1990
------------------------------------------------------------------------
1990's Profile: http://www.excelforum.com/member.php...o&userid=30100
View this thread: http://www.excelforum.com/showthread...hreadid=497851

  #8  
Old January 4th, 2006, 05:57 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default SUMIF with 2 conditions

what does the symbol below mean in your formula above
--

i don't have it?

"1990" wrote:


Spot on, thanks.


--
1990
------------------------------------------------------------------------
1990's Profile: http://www.excelforum.com/member.php...o&userid=30100
View this thread: http://www.excelforum.com/showthread...hreadid=497851


  #9  
Old January 4th, 2006, 10:39 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: n/a
Default SUMIF with 2 conditions

That's 2 minus signs (double unary operator.) They are used to coerce
logical true and false values to 1s and 0s. Let me see if I can find the
link to Bob's site which explains sumproduct very well:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

"ellebelle" wrote:

what does the symbol below mean in your formula above
--

i don't have it?

"1990" wrote:


Spot on, thanks.


--
1990
------------------------------------------------------------------------
1990's Profile: http://www.excelforum.com/member.php...o&userid=30100
View this thread: http://www.excelforum.com/showthread...hreadid=497851


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SUMIF function with 2 conditions rlandlin Worksheet Functions 4 September 28th, 2005 05:50 PM
SUMIF with two conditions Fred Holmes General Discussion 3 May 1st, 2005 10:10 PM
Multiple conditions within the SUMIF function twirly Worksheet Functions 3 September 8th, 2004 06:20 PM
SUMIF with multiple conditions vtisix Worksheet Functions 3 July 6th, 2004 06:27 AM
SUMIF vs SUM(IF(..)) vs SUMPRODUCT Harlan Grove Worksheet Functions 7 July 1st, 2004 10:22 PM


All times are GMT +1. The time now is 07:05 PM.


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