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 » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

SUMIF HELP



 
 
Thread Tools Display Modes
  #1  
Old March 15th, 2005, 04:49 PM
Chance224
external usenet poster
 
Posts: n/a
Default SUMIF HELP

Can you have two arguments for a SUMIF function? I want cell K56 to sum
cells K3:K44 if cells A3:A44 has a value of M or W. I can it to work with
just one value but I’m unsure of how to get it to do two.

Thanks,
Chance

  #2  
Old March 15th, 2005, 04:55 PM
Bob Phillips
external usenet poster
 
Posts: n/a
Default

=SUMPRODUCT(--(A3:A44={"M","W"}),K3:K44)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Chance224" wrote in message
...
Can you have two arguments for a SUMIF function? I want cell K56 to sum
cells K3:K44 if cells A3:A44 has a value of M or W. I can it to work with
just one value but I'm unsure of how to get it to do two.

Thanks,
Chance



  #3  
Old March 15th, 2005, 04:58 PM
Jason Morin
external usenet poster
 
Posts: n/a
Default

Using SUMPRODUCT offers the most flexibility, but in this=20
case you could use:

=3DSUM(SUMIF(A3:A44,{"M","W"},K3:K44))

HTH
Jason
Atlanta, GA

-----Original Message-----
Can you have two arguments for a SUMIF function? I want=20

cell K56 to sum=20
cells K3:K44 if cells A3:A44 has a value of M or W. I=20

can it to work with=20
just one value but I=E2?Tm unsure of how to get it to do=20

two.

Thanks,
Chance

.

  #4  
Old March 15th, 2005, 04:59 PM
Max
external usenet poster
 
Posts: n/a
Default

Try in K56:
=SUMPRODUCT(((A3:A44="M")+(A3:A44="W")),K3:K44)

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik atyahoodotcom
----
"Chance224" wrote in message
...
Can you have two arguments for a SUMIF function? I want cell K56 to sum
cells K3:K44 if cells A3:A44 has a value of M or W. I can it to work with
just one value but I'm unsure of how to get it to do two.

Thanks,
Chance



  #5  
Old March 15th, 2005, 05:25 PM
Max
external usenet poster
 
Posts: n/a
Default

"Bob Phillips" wrote
=SUMPRODUCT(--(A3:A44={"M","W"}),K3:K44)


Tried this, Bob, but think it returns #VALUE!

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik atyahoodotcom
----


  #6  
Old March 15th, 2005, 06:47 PM
Jason Morin
external usenet poster
 
Posts: n/a
Default

I think Bob meant this:

=3DSUMPRODUCT((A3:A44=3D{"M","W"})*K3:K44)

Jason

-----Original Message-----
"Bob Phillips" wrote
=3DSUMPRODUCT(--(A3:A44=3D{"M","W"}),K3:K44)


Tried this, Bob, but think it returns #VALUE!

--
Rgds
Max
xl 97
---
GMT+8, 1=B0 22' N 103=B0 45' E
xdemechanik atyahoodotcom
----


.

  #7  
Old March 15th, 2005, 08:47 PM
John Britto
external usenet poster
 
Posts: n/a
Default

Kindly use the formula in the following manner.

=SUMIF(A3:A6,"m",K3:K6)+SUMIF(A3:A6,"w",K3:K6)+SUM IF(A3:A6,"j",K3:K6)

Good luck..john britto

"Chance224" wrote:

Can you have two arguments for a SUMIF function? I want cell K56 to sum
cells K3:K44 if cells A3:A44 has a value of M or W. I can it to work with
just one value but I’m unsure of how to get it to do two.

Thanks,
Chance

  #8  
Old March 15th, 2005, 11:10 PM
Max
external usenet poster
 
Posts: n/a
Default

"Jason Morin" wrote
I think Bob meant this:
=SUMPRODUCT((A3:A44={"M","W"})*K3:K44)


Thanks, Jason !
Yes, I'm quite sure he meant that g
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik atyahoodotcom
----


  #9  
Old April 3rd, 2005, 04:44 AM
Aladin Akyurek
external usenet poster
 
Posts: n/a
Default

=SUMPRODUCT((A3:A44={"M","W"})*K3:K44)

is not efficient though.

In cases of 2 conditions to or, one can get away with the + idiom:

[1]

=SUMPRODUCT((A3:A44="M")+(A3:A44="W"),K3:K44)

as Max suggested.

The following invokes an efficient idiom for or'ing...

[2]

=SUMPRODUCT(--ISNUMBER(MATCH(A3:A44,{"M","W"},0)),K3:K44)

An equivalent setup with SumIf is...

[3]

=SUMPRODUCT(SUMIF(A3:A44,{"M","W"},K3:K44))

where Sum can be sustituted for SumProduct when a constant array of
conditions is used (as occurs in your other reply).

To recap, with J1:J2 housing the conditions "M" and "W"...

[1] SUMPRODUCT((A3:A44=J1)+(A3:A44=J2),K3:K44)
[2] SUMPRODUCT(--ISNUMBER(MATCH(A3:A44,J1:J2,0)),K3:K44)
[3] SUMPRODUCT(SUMIF(A3:A44,J1:J2,K3:K44))

The first one becomes unwieldy with more conditions. It would be
interesting to compare temporal profiles of the second and the third though.







Jason Morin wrote:
I think Bob meant this:

=SUMPRODUCT((A3:A44={"M","W"})*K3:K44)

Jason


-----Original Message-----
"Bob Phillips" wrote

=SUMPRODUCT(--(A3:A44={"M","W"}),K3:K44)


Tried this, Bob, but think it returns #VALUE!

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik atyahoodotcom
----


.

 




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
How to use SUMIF to return sums between two values located in cells ScottBerger Worksheet Functions 1 November 18th, 2004 07:09 PM
SUMIF vs SUM(IF(..)) vs SUMPRODUCT Harlan Grove Worksheet Functions 7 July 1st, 2004 10:22 PM
SUMIF vs SUM(IF(..)) vs SUMPRODUCT Harlan Grove General Discussion 7 July 1st, 2004 10:22 PM
Narrow range in Sumif formula Steve Worksheet Functions 2 January 14th, 2004 06:16 PM
SUMIF used in a link Nat Worksheet Functions 1 November 17th, 2003 09:02 PM


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