INDEX MATCH MAX Pulling Randomly
I am pulling out my hair with this formula, I have used it in this sheet in a similar fashion and in othe sheets as well but for some reason I am only getting random values returned.
In the LVC.Helper Column:
=IF(COUNTIF([MLL ID]:[MLL ID], [MLL ID]@row) > 1, INDEX([Label Version Code]:[Label Version Code], MATCH(MAX(COLLECT([Final Approval Date]:[Final Approval Date], [MLL ID]:[MLL ID], [MLL ID]@row)), [Final Approval Date]:[Final Approval Date], 0)), [Label Version Code]@row)
The goal is to check if the MLL ID is used more than once and if so look at the Final Approval Date column to figure out which is the most recent. If there is only 1 entry I want it to return the Label Version at the row. I am getting values from random places in the sheet it would seem. I ran it through Copilot and only got further from the answer. Any help is greatly appreciated!
The screenshots below are the only places with MLL IDs in the sheet.
C1124 appears in the sheet 4 times:
Please help me make sense of this! 👏 One more screenshot for good measure!
Best Answer
-
Ended up doing two helper columns:
Most Recent Date.Helper:
=MAX(COLLECT([Final Approval Date]:[Final Approval Date], [MLL ID]:[MLL ID], [MLL ID]@row))
LVC.Helper:
=INDEX(COLLECT([Label Version Code]:[Label Version Code], [MLL ID]:[MLL ID], [MLL ID]@row, [Final Approval Date]:[Final Approval Date], [Most Recent Date.Helper]@row), 1)
Hope this helps someone in the future!
Answers
-
Ended up doing two helper columns:
Most Recent Date.Helper:
=MAX(COLLECT([Final Approval Date]:[Final Approval Date], [MLL ID]:[MLL ID], [MLL ID]@row))
LVC.Helper:
=INDEX(COLLECT([Label Version Code]:[Label Version Code], [MLL ID]:[MLL ID], [MLL ID]@row, [Final Approval Date]:[Final Approval Date], [Most Recent Date.Helper]@row), 1)
Hope this helps someone in the future!
-
Glad you were able to figure this out - thanks so much for posting your solution!
Georgie
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.6K Get Help
- 405 Global Discussions
- 215 Industry Talk
- 456 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 297 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!