Solved sumif with 2 (1 Viewer)

lwarren1968

Registered User.
Local time
Today, 13:20
Joined
Jan 18, 2013
Messages
77
I am trying to include an "&" statement to look at 2 columns within my SUMIF statement, but it's not working. Works fine if I'm only including 1 column. Any advise?

=SUMIF(Sheet1!A2:A1000,"*001*",Sheet1!D2:1000) I want to include an IF Sheet1!C2:A1000,*01*.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:20
Joined
Oct 29, 2018
Messages
21,476
If you're trying to evaluate two cell values for your SUMIF operation, maybe you need to use an AND() operator? Just a thought...
 

lwarren1968

Registered User.
Local time
Today, 13:20
Joined
Jan 18, 2013
Messages
77
If you're trying to evaluate two cell values for your SUMIF operation, maybe you need to use an AND() operator? Just a thought...
I'm not sure how to incorporate the AND(). I'm doing something wrong. Def. not an expert.

=SUMIF(AND(Sheet1!A2:A1000,"*001*",Sheet1C2:C1000),Sheet1!D2:1000)
 

lwarren1968

Registered User.
Local time
Today, 13:20
Joined
Jan 18, 2013
Messages
77
Use SUMIFS?
I'm getting an error "entered to few arguments for the function"

=SUMIFS(Sheet1!A2:A1000, Sheet1!C2:C1000,"*01*",Sheet1!D2:166)

LOCDATEDrawerCASH
001
03/23/23​
00-507
0.00​
001
03/23/23​
00-768
0.00​
001
03/23/23​
00-WEB
0.00​
001
03/23/23​
01-013
719.58​
001
03/23/23​
01-014
460.90​
001
03/23/23​
01-015
1008.47​
999
03/23/23​
01-030
61.31​
004
03/23/23​
04-041
0.00​
004
03/23/23​
04-042
1156.07​
006
03/23/23​
06-061
529.22​
006
03/23/23​
06-062
884.28​
 

Gasman

Enthusiastic Amateur
Local time
Today, 21:20
Joined
Sep 21, 2011
Messages
14,317
So google the syntax for sumifs. That is what I do. If I remember correctly, the order of the parameters is different to sumif?
 

lwarren1968

Registered User.
Local time
Today, 13:20
Joined
Jan 18, 2013
Messages
77
So google the syntax for sumifs. That is what I do. If I remember correctly, the order of the parameters is different to sumif?
I honestly have been googling. I'm missing something, hence the reason I'm asking for help.
 

Gasman

Enthusiastic Amateur
Local time
Today, 21:20
Joined
Sep 21, 2011
Messages
14,317
This explains the syntax. Cannot get better than this really?


and I was remembering correctly, as for SumIf the parameters are in a different order.


From the last link

Understand the difference between SUMIF and SUMIFS.The order of arguments differ between SUMIFS and SUMIF. In particular, the sum_range argument is the first argument in SUMIFS, but it is the third argument in SUMIF. This is a common source of problems using these functions.
If you're copying and editing these similar functions, make sure you put the arguments in the correct order.
 
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:20
Joined
May 7, 2009
Messages
19,245
see this demo.
if your formula result is always = 0, then you need to Re-type the Cash value (one by one).
 

Attachments

  • sumIfs_wb.zip
    7.8 KB · Views: 78

lwarren1968

Registered User.
Local time
Today, 13:20
Joined
Jan 18, 2013
Messages
77
see this demo.
if your formula result is always = 0, then you need to Re-type the Cash value (one by one).
Thank you so much. This works perfectly. I didn't think to put the calculation in first.
 

lwarren1968

Registered User.
Local time
Today, 13:20
Joined
Jan 18, 2013
Messages
77
So post #8 was a waste of time? :(
Absolutely not. All has been helpful. I think I was in my head regarding how it should work vs how it actually works. Taking a second look this morning clarified the process. Thanks you.
 

Users who are viewing this thread

Top Bottom