Sumif question

bionicle

Board Regular
Joined
Apr 23, 2009
Messages
177
Office Version
  1. 365
Platform
  1. Windows
Hi All,

have a question for you, if I have a list of dates in the format of 05/01/2016 but want to return a sum value against all the dates listed as January how do I do it?
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

pocquet

Board Regular
Joined
Aug 21, 2013
Messages
118
HI,

Do you mean a count (eg the number of dates in jan)? if so you need to use countif
 

Fishboy

Well-known Member
Joined
Feb 13, 2015
Messages
4,267
Hi All,

have a question for you, if I have a list of dates in the format of 05/01/2016 but want to return a sum value against all the dates listed as January how do I do it?
Hi bionicle,

Assuming that your dates and in column A and the values are in column B you could try this:

=SUMIFS(B1:B100,A1:A100,">="&DATE(2016,1,1),A1:A100,"<="&DATE(2016,1,31))


Alternatively, assuming your dates are in row 1 going across and your values are in row 2 then you could try this:

=SUMIFS(A2:CV2,A1:CV1,">="&DATE(2016,1,1),A1:CV1,"<="&DATE(2016,1,31))
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
Hi All,

have a question for you, if I have a list of dates in the format of 05/01/2016 but want to return a sum value against all the dates listed as January how do I do it?

=SUMIFS(B:B,A:A,">="&(1&E1),A:A,"<="&EOMONTH(1&E1,0))

where column B is the reference to sum, column A houses dates, and E1 the month name january.
 

steve the fish

Well-known Member
Joined
Oct 20, 2009
Messages
8,716
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

Something like this:

=SUMIFS(A:A,B:B,">="&"01/01/2016",B:B,"<"&"01/02/2016")

The dates can be replaced for cell references if you want.
 

bionicle

Board Regular
Joined
Apr 23, 2009
Messages
177
Office Version
  1. 365
Platform
  1. Windows
Hi bionicle,

Assuming that your dates and in column A and the values are in column B you could try this:

=SUMIFS(B1:B100,A1:A100,">="&DATE(2016,1,1),A1:A100,"<="&DATE(2016,1,31))


Alternatively, assuming your dates are in row 1 going across and your values are in row 2 then you could try this:

=SUMIFS(A2:CV2,A1:CV1,">="&DATE(2016,1,1),A1:CV1,"<="&DATE(2016,1,31))


works a treat, thank you
 

bionicle

Board Regular
Joined
Apr 23, 2009
Messages
177
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

Thanks all, most appreciated.
 

bionicle

Board Regular
Joined
Apr 23, 2009
Messages
177
Office Version
  1. 365
Platform
  1. Windows
Just noticed something, on my spread sheet I have multiple years; what if I only want to look at the month rather than specific years i.e all dates say within January rather than just 2016?

also how would I get it to look at a third column (Q) so it only summed against the word WON
 

Fishboy

Well-known Member
Joined
Feb 13, 2015
Messages
4,267
Just noticed something, on my spread sheet I have multiple years; what if I only want to look at the month rather than specific years i.e all dates say within January rather than just 2016?

also how would I get it to look at a third column (Q) so it only summed against the word WON
You'd probably want to change this to a SUMPRODUCT as follows:

=SUMPRODUCT((MONTH(A1:A100)=1)*((Q1:Q100)="WON")*B1:B100)

The above checks that the month in column A is 1 regardless of the year, it looks at column Q for the value "WON", then sums the values from column B of the corresponding rows.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,149
Messages
5,835,683
Members
430,375
Latest member
datdog22

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