Sumifs formula not adding

Dark0Prince

Active Member
Joined
Feb 17, 2016
Messages
433
=SUMIFS(JOET2!D:D,JOET2!A:A,8568,JOET2!B:B,2016,JOET2!E:E,12)

So what I want it to do is count the cells in D column, when a column has 8568 &b column has a date with 2016 in it like 12/01/2016 and when E column has the correct month in it so i just did =B and formatted it to show me MM. but nothing adds up.
 

Some videos you may like

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
If Columns B and E contain actual dates that won't work because it's looking for a literal match to 2016 and 12

Try something like this:

=SUMPRODUCT(--(YEAR(JOET2!B1:B1000)=2016),--(MONTH(JOET2!E1:E1000)=12),JOET2!D1:D1000)
 

Dark0Prince

Active Member
Joined
Feb 17, 2016
Messages
433
If Columns B and E contain actual dates that won't work because it's looking for a literal match to 2016 and 12

Try something like this:

=SUMPRODUCT(--(YEAR(JOET2!B1:B1000)=2016),--(MONTH(JOET2!E1:E1000)=12),JOET2!D1:D1000)



I'm getting a value error on that formula and i'm doing ctrl shift enter as well. What is the last part of this forumuladoing ? counting the cells in D column?
 

Dark0Prince

Active Member
Joined
Feb 17, 2016
Messages
433
I'm getting a value error on that formula and i'm doing ctrl shift enter as well. What is the last part of this forumuladoing ? counting the cells in D column?

I reread the formula and it looks like line one was counted and that was just headers so I changed that and it worked to sum numbers but I was trying to count the cells how can I change this?
 

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows

ADVERTISEMENT

It doesn't need CTRL-SHIFT-ENTER. The last column is returning the values from column D. For every TRUE/FALSE for the first 2 conditions it will return 1 or 0, and it will multiply that by the value in Column D and sum all those values. If either of the 2 values is false it would be something like 1 * 0 * Value in Column D, so both values would have to be true for column D to be included in the sum.

Are the ranges you put in the formula the exact same size? Can you post the formula as you have used it.

To count the rows instead of summing just eliminate the last section of the formula:

=SUMPRODUCT(--(YEAR(JOET2!B2:B1000)=2016),--(MONTH(JOET2!E2:E1000)=12))
 
Last edited:

Dark0Prince

Active Member
Joined
Feb 17, 2016
Messages
433
Thanks works great now! Also i had account numbers in row D so that would have been bad if it was multiplying
 

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Glad you got it working. Column D was what you had in your sum range in your original post which is why I included it.
 

Watch MrExcel Video

Forum statistics

Threads
1,127,613
Messages
5,625,848
Members
416,139
Latest member
MattBoard

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top