SUMIFS not recognizing criterion when it is a formula
Hi,
I have written a few simple SUMIFS that use the current month or current year as the criterion. However when I combine the RIGHT function in the cell with the criterion, the formula returns $0 (it should return $200).
If I manually type 21 and set this as the criterion, the SUMIFS works. If I use the same formula and adjust it to look at the current month, the SUMIFS works. I believe the inclusion of the RIGHT function is the problem but I don't know why or how to fix it. Or maybe it's a bug?
Please see attached image.
Formulas used:
Today's Date =TODAY()
Current Month =MONTH([Today's Date]@row)
Current Year =RIGHT([Today's Date]@row, 2)
Rolling Sum =SUMIFS([Nov 2020]@row:[May 2021]@row, $[Nov 2020]$3:$[May 2021]$3, <$[Current Year]$1)
Note: I'm not able to use the date format, so I added a row to label my months as 1, 2, 3, 4, etc. and a row for year labels as 20, 21.
Thanks,
Hannah
Best Answer
-
The problem is that when you use the RIGHT function it is converting it to a text value. Wrap it in a VALUE function to convert it back into a number and see if that works for you.
Answers
-
The problem is that when you use the RIGHT function it is converting it to a text value. Wrap it in a VALUE function to convert it back into a number and see if that works for you.
-
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!