Index/Match with Minimum value
Hello Community,
What I'm trying to do is use a Helper Sheet to pull two values from other sheets based on a name match.
My Helper sheet has a list of names and a few other columns, two of which I'm using to try and pull the earliest date from two other sheets. Those sheets are a Scheduler and PTO Request form.
As such, my current code to pull a date matched to the name is:
=INDEX({Scheduler - Date Start}, MATCH([Employee Name]@row, {Scheduler - Name}, 0))
As the PTO and Scheduler are unsorted, this will pull whichever one it finds first, but what I want to do is find the earliest date in this unsorted list for the person who's name matches. Both sheets will have an archiving function to remove PTO and Schedule dates after that date is over, so the newest minimum date will always be something else.
Any help would be appreciated, thank you!
Best Answer
-
You would want to go with a MIN/COLLECT combo instead.
=MIN(COLLECT({Date Column}, {Name Column}, @cell = Name@row))
Answers
-
You would want to go with a MIN/COLLECT combo instead.
=MIN(COLLECT({Date Column}, {Name Column}, @cell = Name@row))
-
Paul,
Thank you so much for this! This is exactly what I needed.
I've been lurking and reading all kinds of things before I posted and your answers in posts from years ago have helped me as well!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 66.9K Get Help
- 441 Global Discussions
- 153 Industry Talk
- 501 Announcements
- 5.4K Ideas & Feature Requests
- 85 Brandfolder
- 155 Just for fun
- 79 Community Job Board
- 511 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 308 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!