SUMIF(AND) FUNCTION

D

Dave Gremaud

Does anyone use this function or have any suggestions on a
different function that may work. I have a very large
worksheet with multiple data columns. I am trying to sum
multiple cells by using multiple variables. The SUMIF
function works well but I can't insert more than one
criteria. I have tried many times without success. I
would greatly appreciate any assistance.

Here is an example of my need:

I would like a function to read (if column "a" = 100 and
column "b" = "manager" then sum these fields).

I know there must be a solution but it escapes me.

Thanks!

Dave
 
F

Frank Kabel

Hi
use SUMPRODUCT instead. e.g.
=SUMPRODUCT(--(A1:A100=100),--(B1:B100="manager"),C1:C100)
 
D

dave

Frank,

Sorry, I got an error. What do I put in where the "--"
are?

Here is a more accurate example of my worksheet.

Column A lists a range of account numbers so I'd like this
range to find all 4000 accounts.

Column C lists a range of departments so I'd like to
find "collections"

column D lists the location so I want "michigan"

Column F has the balances so I want the sum of every
account that meets these 3 criteria.

Thanks,

Dave
 
F

Frank Kabel

Hi
first don't replace the '--'. They coerce the boolean values to real
numbers (TRUE=1/FALSE=0)
for your example if you want to get the sum for one specific account
use
=SUMPRODUCT(--(A1:A4000=account_number),--(C1:C4000="collections"),--(D
1:D4000="michigan"),F1:F4000)

Note: this is case sensitive. You may also consider using a pivot table
for this:
http://www.cpearson.com/excel/pivots.htm
http://peltiertech.com/Excel/Pivots/pivotstart.htm
http://www.contextures.com/xlPivot02.html
http://www.ozgrid.com/Excel/excel-pivot-tables.htm
 
R

RagDyer

<<"Note: this is case sensitive.">>

Can you tell me Frank, *WHAT* is case sensitive?
--

Regards,

RD
--------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit!
-------------------------------------------------------------------

Hi
first don't replace the '--'. They coerce the boolean values to real
numbers (TRUE=1/FALSE=0)
for your example if you want to get the sum for one specific account
use
=SUMPRODUCT(--(A1:A4000=account_number),--(C1:C4000="collections"),--(D
1:D4000="michigan"),F1:F4000)

Note: this is case sensitive. You may also consider using a pivot table
for this:
http://www.cpearson.com/excel/pivots.htm
http://peltiertech.com/Excel/Pivots/pivotstart.htm
http://www.contextures.com/xlPivot02.html
http://www.ozgrid.com/Excel/excel-pivot-tables.htm
 
F

Frank Kabel

Hi
e.g.
"FRANK" <> "frank"
taht is differentiation between upper and lower case
 
R

RagDyer

And ... in relation to your post ... WHAT is case sensitive???
--

Regards,

RD
--------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit!
-------------------------------------------------------------------

Hi
e.g.
"FRANK" <> "frank"
taht is differentiation between upper and lower case
 
F

Frank Kabel

Hi
e.g. the part
....(D1:D4000="michigan")
is different then
....(D1:D4000="Michigan")

to prevent this one could use:
....(LOWER(D1:D4000)="michigan")
 
R

RagDyer

I find no difference in the calculation of SumProduct, no matter if
MICHIGAN,
michigan,
OR
Michigan
is used!
Either in the datalist, OR the formula.

AFAIK, I believe SumProduct is *not* case sensitive!
--


Regards,

RD
--------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit!
-------------------------------------------------------------------

Hi
e.g. the part
....(D1:D4000="michigan")
is different then
....(D1:D4000="Michigan")

to prevent this one could use:
....(LOWER(D1:D4000)="michigan")
 
D

Dave

Frank,

You da man!!!! It worked like a charm and this makes my
life SO much easier. Thank you very much!
 
B

brianwa

Try this,
Insert a new column A.
in cell a1 enter the following =b1&c1. Run this formula down you
list.
Asuming the numbers you want to add are in column D, in cell E1 ente
the following, =SUMIF(A1:A100,100&"manager",D1:D100)

Good luck
B
 
R

RagDyer

That's rare for me!
For YOU, that's the normal course!<g>
--
Regards,

RD
--------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit!
-------------------------------------------------------------------

Hi RD
my fault, it's getting too late :)
Had a separate discussion via private mail about SUMPRODUCT (but also
using EXACT in this case).
So you're of course right!!
 
F

Frank Kabel

Hi RD
my fault, it's getting too late :)
Had a separate discussion via private mail about SUMPRODUCT (but also
using EXACT in this case).
So you're of course right!!
 
G

Guest

Hi Frank,

I usually use your replies with blind eyes, and Bingo. However, I have tried
this solution of multiple arrays and condition, and a little problem for me
on this one.

I have 3 colums: A-dealer B-Date C-sale
I want to sum (Pivot Table is not suitable for this part, I use it on a
different worksheet) All sales made be a dealer based on a month.

Asia 9/28/2004 2134
Asia 9/30/2004 2136
Europe 10/1/2004 2137
Europe 10/4/2004 2138
Europe 10/12/2004 2139
Europe 10/12/2004 2140
Asia 10/17/2004 2141
Europe 10/18/2004 2142

The sum would go to a different sheet
MONTH Dealer Total Sales
September Asia ?????
October Europe ?????

Again, I can't use pivot table for this part.

I tried to tweak your funciton:
=SUMPRODUCT(--(A3:A10000="Asia"),--(B3:B10000="9/28/2004"))
=SUMPRODUCT(--(A3:A10000="Asia"),--(MONTH(B3:B10000)=10))
=SUMPRODUCT(--(A3:A10000="Asia"),--(MONTH(B3):MONTH(B10000)=10))

but no luck.

Can you help?
 
R

Rob

Hi,

How about if you add a column after the date and include the formula
MONTH(A2) that returns the month number then use the following formula:

A = dealer
B = date
C = month number
D = sale

=SUMPRODUCT(--(A2:A9=A13),--(C2:C9=B13),D2:D9)

You'd then need to enter 9 instead of September in you other sheet as the
matching criteria.

Good luck, Rob
 
G

Govind

Hi,

If you want the sales for Asia region for the month of September, use

=SUMPRODUCT(--(A3:A10000="Asia"),--(MONTH(B3:B10000)=9),--(C3:C10000))

Regards

Govind.
 
G

Guest

Hi again,

I wen to the xLDunamic help page:
Here is another unsuccessful try:
=SUMPRODUCT((A170:A180="Asia")*(MONTH(ROW(B179:B180))=9)*(C170:C180))

please?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Sumif Function 1
Multiple SUMIF criteria 1
SUMIF with criteria "<>" & "=" 4
Sumif using Arrays 2
SUMIF Function ? 1
SUMIF function 3
SUMIF Function 2
sumif 2

Top