finding year instead of date

Ronderbecke

Board Regular
Joined
Oct 4, 2017
Messages
73
I realize this is probably something small that I am overlooking, but currently I have a way to get a total of a certain month and I need to change it to a certain year. Is it possible to change something in this equation so it pulls everything for the year instead of just the month?

=SUMPRODUCT(IF('Travis Jones'!B2:B-DAY('Travis Jones'!B2:B)+1=DATE(2017,12,1),'Travis Jones'!D2:D))
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Try:

=SUMPRODUCT(--(YEAR(B2:B100)=2017),D2:D100)

or maybe:

=SUMIFS(D:D,B:B,">="&DATE(2017,1,1),B:B,"<"&DATE(2018,1,1))

Add the sheet names to the appropriate ranges.
 
Upvote 0

Excel 2010
BCDEFG
1DateAmountYear201620
21-Dec-1620Year2017170
31-Dec-1740
420-May-1730
512-Dec-17100
6140
7
Travis Jones
Cell Formulas
RangeFormula
G1=SUMPRODUCT(--(YEAR('Travis Jones'!B2:B1000)=F1),('Travis Jones'!D2:D1000))
G2=SUMPRODUCT(--(YEAR('Travis Jones'!B2:B1000)=F2),('Travis Jones'!D2:D1000))
G6=SUMPRODUCT(--('Travis Jones'!B2:B1000-DAY('Travis Jones'!B2:B1000)+1=DATE(2017,12,1)),('Travis Jones'!D2:D1000))


Edit the 1000 to an appropriate number considering your data.
 
Upvote 0
For some reason these are not working but I think it may be because of the date format in column b?

<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
CustomerCRC DateSystem SizePPW PayoutPanel Upgrade
Douglas Rogers7/11/20175.61$4.17YES
Andrew Bean7/10/201713.63$3.91

<colgroup><col style="width: 172px"><col width="72"><col width="79"><col width="81"><col width="94"></colgroup><tbody>
</tbody>


Is the structure of the date messing up the formula by chance? All of these formula's keep returning 0?
 
Upvote 0
Try:

=SUMPRODUCT(--(YEAR(B2:B100)=2017),D2:D100)

or maybe:

=SUMIFS(D:D,B:B,">="&DATE(2017,1,1),B:B,"<"&DATE(2018,1,1))

Add the sheet names to the appropriate ranges.

I must have fat fingered something because I was going through trying again and again and the first formula worked. Thanks so much.
 
Upvote 0
With the year working, is there a way to break down a year into quarters? I have tried converting the 2017 to each quarter for data referencing but everything I try doesn't seem to work? The formula works perfect for year, but is there a way to split that first formula into Q1, Q2, etc?
 
Upvote 0
This would do first quarter of 2017:

=SUMPRODUCT(--(YEAR(B2:B100)=2017),--(ROUNDUP(MONTH(B2:B100)/3,0)=1),D2:D100)
 
Upvote 0

Excel 2010
BCDEFGH
1DateAmount201620
21-Dec-1620
31-Dec-1740
420-May-17301-Jan-19203Qtr 1
512-Dec-171001-Apr-19207Qtr 2
65-Jan-191011-Jul-19
720-Jan-19102
84-Apr-19103
95-May-19104
Travis Jones
Cell Formulas
RangeFormula
G1=SUMPRODUCT(--(YEAR('Travis Jones'!B2:B1000)=F1),('Travis Jones'!D2:D1000))
G4=SUMIFS(D:D,B:B,">="&F4,B:B,"<"&F5)
G5=SUMIFS(D:D,B:B,">="&F5,B:B,"<"&F6)
 
Upvote 0

Forum statistics

Threads
1,214,942
Messages
6,122,366
Members
449,080
Latest member
Armadillos

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
Back
Top