SUMIFS for prior month
I've been trying to figure this one out for a while and cannot get it to work. We want to have a count of how many RFPs meet criteria for the prior month (without having to filter on a report every time). Is this possible? Here's what I have for the simplest one, but it is not giving me the correct number:
=COUNTIFS(Source:Source, CONTAINS("GSD", @cell), [Date Received]:[Date Received], IFERROR(MONTH(@cell), 0) = MONTH(TODAY())-1)
Thank you in advance!
Best Answer
-
See below:
=COUNTIFS(Source:Source, CONTAINS("GSD", @cell), [Date Received]:[Date Received], OR(AND(IFERROR(MONTH(@cell), 99) = (MONTH(TODAY()) - 1), IFERROR(YEAR(@cell), 0) = YEAR(TODAY())), AND(IFERROR(MONTH(@cell), 99) = (MONTH(TODAY()) + 11), IFERROR(YEAR(@cell), 0) = (YEAR(TODAY()) - 1))))
Answers
-
Try the below:
=COUNTIFS(Source:Source, CONTAINS("GSD", @cell), [Date Received]:[Date Received], OR(IFERROR(MONTH(@cell), 99) = (MONTH(TODAY()) - 1), IFERROR(MONTH(@cell), 99) = (MONTH(TODAY()) + 11)))
-
That returns too high a number.
-
Is this a list that goes back more then 12 months?
The formula above does not take into account the year... Do you need that?
-
@Leibel S - yes it does so I guess I do need to add the year. Thank you!
-
See below:
=COUNTIFS(Source:Source, CONTAINS("GSD", @cell), [Date Received]:[Date Received], OR(AND(IFERROR(MONTH(@cell), 99) = (MONTH(TODAY()) - 1), IFERROR(YEAR(@cell), 0) = YEAR(TODAY())), AND(IFERROR(MONTH(@cell), 99) = (MONTH(TODAY()) + 11), IFERROR(YEAR(@cell), 0) = (YEAR(TODAY()) - 1))))
-
That worked! Thank you so much.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 497 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!