Help with INDEX/COLLECT with a MAX/COLLECT
I am attempting to create a few reference columns using an INDEX/COLLECT function and incorporating a MAX/COLLECT because there is a 1-Many relationship on the RTO Queue ID in the 2nd sheet so I would like to use the row with the MAX Fully Executed Date. Below is the formula I am using:
=INDEX(COLLECT({IA Assigned}, {RTO Queue ID}, [RTO Queue ID]@row, {Fully Executed Date}, MAX(COLLECT({Fully Executed Date}, {RTO Queue ID}, [RTO Queue ID]@row))), 1)
This is working, except it doesn't take into account when Fully Executed Date is blank. How can I incorporate the data when the Fully Executed Date is blank?
Answers
-
Do you want to include or exclude rows where that date is blank?
-
I would like to include rows where the date is blank.
-
Ok. Try this:
=INDEX(COLLECT({IA Assigned}, {RTO Queue ID}, [RTO Queue ID]@row, {Fully Executed Date}, OR(@cell = "", @cell = MAX(COLLECT({Fully Executed Date}, {RTO Queue ID}, [RTO Queue ID]@row)))), 1)
-
Thank you for your response. I am now getting #NESTED CRITERIA. Any additional thoughts?
-
In that case you will need to insert a helper column that houses the MAX/COLLECT, and then you would reference this column in the OR function.
-
Ok, I have successfully created a helper column with the formula below:
=MAX(COLLECT({Fully Executed Date}, {RTO Queue ID}, [RTO Queue ID]@row
Now I am questioning whether the Helper Column should reside on the original sheet or the sheet I am referencing (or does it matter?)
Also, from the current formula,
=INDEX(COLLECT({IA Assigned}, {RTO Queue ID}, [RTO Queue ID]@row, {Fully Executed Date}, OR(@cell = MAX (COLLECT({Fully Executed Date}, {RTO Queue ID}, [RTO Queue ID]@row)))), 1)
Where/How should reference the Helper Column?
=INDEX(COLLECT({IA Assigned}, {RTO Queue ID}, [RTO Queue ID]@row, {Fully Executed Date}, OR(@cell = "", @cell = [Helper Column A]@row))), 1)
I know this isn't 100% correct as I am receiving #INCORRECT ARGUMENT.
Thank you for all your help & patience 😀
-
The helper column goes in the same sheet as the INDEX/COLLECT.
One of the three grouped closing parenthesis there before the 1 should be removed.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 66.6K Get Help
- 435 Global Discussions
- 152 Industry Talk
- 495 Announcements
- 5.3K Ideas & Feature Requests
- 85 Brandfolder
- 155 Just for fun
- 77 Community Job Board
- 508 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 308 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!