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.5K Get Help
- 447 Global Discussions
- 144 Industry Talk
- 480 Announcements
- 5.1K Ideas & Feature Requests
- 85 Brandfolder
- 152 Just for fun
- 72 Community Job Board
- 492 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 304 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!