SumIF Formula
I am trying to do a sum of cures by year, I have a column for the month "Date" and many other columns. here is the formula I am using but the result = 0 =SUMIF(Date:Date, IFERROR(YEAR(@cell), 0) = YEAR(TODAY(2020)), [Cure Amount]:[Cure Amount]). Thanks for your help.
Best Answer
-
Hi Ivan,
You are getting 0 because by entering 2020 in the TODAY function you are getting a date that is 2,020 days ahead of TODAY. If you truly want your criteria to be the YEAR for TODAY (July 28, 2021), then enter 0 in the TODAY function. Alternatively, if you want the year to be 2020, there is no need to use the YEAR or the TODAY function; rather, just use the integer 2020. See below:
=SUMIF(Date:Date, IFERROR(YEAR(@cell), 0) = 2020, [Cure Amount]:[Cure Amount])
OR
=SUMIF(Date:Date, IFERROR(YEAR(@cell), 0) = YEAR(TODAY(0)), [Cure Amount]:[Cure Amount])
Answers
-
Hi Ivan,
You are getting 0 because by entering 2020 in the TODAY function you are getting a date that is 2,020 days ahead of TODAY. If you truly want your criteria to be the YEAR for TODAY (July 28, 2021), then enter 0 in the TODAY function. Alternatively, if you want the year to be 2020, there is no need to use the YEAR or the TODAY function; rather, just use the integer 2020. See below:
=SUMIF(Date:Date, IFERROR(YEAR(@cell), 0) = 2020, [Cure Amount]:[Cure Amount])
OR
=SUMIF(Date:Date, IFERROR(YEAR(@cell), 0) = YEAR(TODAY(0)), [Cure Amount]:[Cure Amount])
-
Thank Steven that work
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65K Get Help
- 443 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 5K Ideas & Feature Requests
- 129 Brandfolder
- 150 Just for fun
- 70 Community Job Board
- 497 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!