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!
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 437 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!