#1   Report Post  
Posted to microsoft.public.excel.misc
Brian Matlack
 
Posts: n/a
Default SumIf Problem


Hi!
Can I put a dual criteria in a SumIf Function? I want to sum column C
(Reciepts) if adjacent cell value (column G part number) is found in
column A (list of all part numbers) and if column E = 1 (month of
January).

I'm probably overthinking this but I cannot make it work. Here is what
I have that doesnot work. This formula is in column H.

=SUMIF(A4:A58521,AND(G2,E2=1),C4:C58521)

Thanks for any help or suggestions!


--
Brian Matlack
------------------------------------------------------------------------
Brian Matlack's Profile: http://www.excelforum.com/member.php...fo&userid=3508
View this thread: http://www.excelforum.com/showthread...hreadid=532801

  #2   Report Post  
Posted to microsoft.public.excel.misc
GoBobbyGo
 
Posts: n/a
Default SumIf Problem

I would add a column that concatenates column A and column E. Say we insert
that column between F & G, so that it becomes the new G.

So in G2 we have =A2&E2
and in I2 we have
=SUMIF(G4:G58521,H2&"1",C4:C58521)


"Brian Matlack" wrote:


Hi!
Can I put a dual criteria in a SumIf Function? I want to sum column C
(Reciepts) if adjacent cell value (column G part number) is found in
column A (list of all part numbers) and if column E = 1 (month of
January).

I'm probably overthinking this but I cannot make it work. Here is what
I have that doesnot work. This formula is in column H.

=SUMIF(A4:A58521,AND(G2,E2=1),C4:C58521)

Thanks for any help or suggestions!


--
Brian Matlack
------------------------------------------------------------------------
Brian Matlack's Profile: http://www.excelforum.com/member.php...fo&userid=3508
View this thread: http://www.excelforum.com/showthread...hreadid=532801


  #3   Report Post  
Posted to microsoft.public.excel.misc
daddylonglegs
 
Posts: n/a
Default SumIf Problem


Brian Matlack Wrote:
Hi!
Can I put a dual criteria in a SumIf Function? I want to sum column C
(Reciepts) if adjacent cell value (column G part number) is found in
column A (list of all part numbers) and if column E = 1 (month of
January).

I'm probably overthinking this but I cannot make it work. Here is what
I have that doesnot work. This formula is in column H.

=SUMIF(A4:A58521,AND(G2,E2=1),C4:C58521)

Thanks for any help or suggestions!


For more than one criterion SUMPRODUCT is usually more appropriate...

SUMPRODUCT(--(A$4:A$58521=G2),--(E$4:E$58521=1),C$4:C$58521)


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=532801

  #4   Report Post  
Posted to microsoft.public.excel.misc
Jim May
 
Posts: n/a
Default SumIf Problem

Use in cell H4:
=SUMPRODUCT((A4:A15=G4:G15) * (MONTH(E4:E15)=1) * (C4:C15))




"Brian Matlack"
wrote in message
news:Brian.Matlack.2683yn_1144966202.3654@excelfor um-nospam.com...

Hi!
Can I put a dual criteria in a SumIf Function? I want to sum column C
(Reciepts) if adjacent cell value (column G part number) is found in
column A (list of all part numbers) and if column E = 1 (month of
January).

I'm probably overthinking this but I cannot make it work. Here is what
I have that doesnot work. This formula is in column H.

=SUMIF(A4:A58521,AND(G2,E2=1),C4:C58521)

Thanks for any help or suggestions!


--
Brian Matlack
------------------------------------------------------------------------
Brian Matlack's Profile:
http://www.excelforum.com/member.php...fo&userid=3508
View this thread: http://www.excelforum.com/showthread...hreadid=532801



  #5   Report Post  
Posted to microsoft.public.excel.misc
blackbox via OfficeKB.com
 
Posts: n/a
Default SumIf Problem

Is column E (month) just a number? 1 for Jan, or do you have an actual date?
01/15/2006
The date 01/15/2006 has a number value of 38732.

Just to make sure I understand what you want,
If E2 and G2 both equal 1, you want to sum column C rows 4 to 58521 for
corrisponding cells in column A that have a value of 1.
Is this correct?

What's in C1 - C3? if they are not numbers than this may work.
=IF(AND(E2=1,G2=1),SUMIF(A1:A58521,"=1",C1:C58521) )

with the criteria array in the SUMIF statement starting at row 1 it will sum
column C starting at row 1 as well.

good luck

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200604/1


  #6   Report Post  
Posted to microsoft.public.excel.misc
Ken Johnson
 
Posts: n/a
Default SumIf Problem

Hi Brian,
when you say...

"if adjacent cell value (column G part number) is found in column A
(list of all part numbers)"
does this mean 'found anywhere in column A', or does it mean 'found in
the same row of column A' ?

Because you have called column A a 'List of all part numbers' I have
assumed you mean 'found anywhere in column A'.

If my interpretation of your question is correct then I think VLOOKUP
is going to have to be a part of the solution. I don't think that
SUMPRODUCT can work like VLOOKUP ((but of course I could be wrong,
amazing things have been achieved using SUMPRODUCT).

If you add the following formula to a spare column, say column H...

=ISNUMBER(VLOOKUP(G4,A$4:A$58521,1,FALSE))
then fill down to row 58521

then use...

=SUMPRODUCT((E4:E58521=1)*H4:H58521*C4:C58521) in your Sum cell

you should get the sum you are after if my interpretation of your
question is correct.

Ken Johnson

  #7   Report Post  
Posted to microsoft.public.excel.misc
Brian Matlack
 
Posts: n/a
Default SumIf Problem


Thanks to all, for the great ideas! I was able to make the concantinate
idea, from GoBobbyGo, work well. I will save the others for future
reference and no doubt get use out of them as well.

Thanks again!!


--
Brian Matlack
------------------------------------------------------------------------
Brian Matlack's Profile: http://www.excelforum.com/member.php...fo&userid=3508
View this thread: http://www.excelforum.com/showthread...hreadid=532801

  #8   Report Post  
Posted to microsoft.public.excel.misc
Ken Johnson
 
Posts: n/a
Default SumIf Problem

Hi Brian,

Thanks for the feedback.
It's nice knowing you've had success.

Ken Johnson

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
importing csv files, problem with date formats jiwolf Excel Worksheet Functions 5 March 7th 06 12:48 AM
sumif problem puiuluipui Excel Discussion (Misc queries) 6 February 5th 06 10:01 AM
Problem with SUMIF criteria Kimhull Excel Discussion (Misc queries) 5 February 1st 06 06:37 PM
Excel Display Problem Bill Martin -- (Remove NOSPAM from address) Excel Discussion (Misc queries) 0 April 19th 05 05:25 PM
SUMIF problem Hodge Excel Worksheet Functions 1 November 11th 04 11:02 AM


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