Pull latest date before today
I am trying to pull the latest date a document was reviewed. The review dates are on separate sheet and each document has an ID# (there is an ID# column). There are different types of reviews which is listed in the Parent Row and I have the collect function pulling specific review types. I was able to achieve this with the formula below:
=INDEX(MAX(COLLECT({Reference Sheet_Start Date}, {Reference Sheet_Parent}, "Review Type", {Reference Sheet_Document ID#}, [Primary Column]@row)), 1)
the primary column on the second sheet contains the Document ID#s
Can I add to this formula so the output is dates ONLY before today's date? Do i need to add an IF function or >=TODAY()
Best Answer
-
thank you that did the trick!
=MAX(COLLECT({Reference Sheet_Start Date}, {Reference Sheet__Parent}, "Review Type", {Reference Sheet_Start Date}, <=TODAY(), {Reference Sheet_Document ID#}, [Primary Column]@row))
Answers
-
You actually do not need the INDEX function at all. You should be able to use just the MAX/COLLECT. To get it to pull in the most recent date that is less than TODAY(), you would add the date range as a criteria range and the criteria would be less than or equal to TODAY().
-
thank you that did the trick!
=MAX(COLLECT({Reference Sheet_Start Date}, {Reference Sheet__Parent}, "Review Type", {Reference Sheet_Start Date}, <=TODAY(), {Reference Sheet_Document ID#}, [Primary Column]@row))
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.1K Get Help
- 444 Global Discussions
- 141 Industry Talk
- 472 Announcements
- 5K Ideas & Feature Requests
- 83 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 489 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!