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
- Smartsheet Customer Resources
- 64.3K Get Help
- 423 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 143 Just for fun
- 59 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!