Stumped - Index(Collect)
Hello, I am stumped on why a formula is not working. The below formula should return the next milestone in a project plan. This uses cross sheet references.
=IFERROR(INDEX(COLLECT({Phase/Milestone}, {IsMilestone}, true, {Start Date}, >Today@row), 1), "")
{Phase/Milestone} is text column of project Phases or Milestones.
{IsMilestone} is a checkbox column when the row is a milestone
Start Date is the Start Date column for the project plan
Today @row refers to a column that uses an automation to update the date in the column to the current day - this column is on the sheet with the formula and the automation runs daily.
The problem is, I get no response. Everything seems to be in order in the sheet - there is text in the Phase/Milestone column, the box is checked in the IsMilestone column and the Today column has has the correct date.
Any suggestions?
Best Answer
-
Happy to help. 👍️
The logic used in your formula won't necessarily return the earliest date. The COLLECT function pulls a list together of all rows that match the range/criteria sets from top to bottom with no special sorting or anything. The INDEX/1 pulls the first entry from the list generated by the COLLECT function.
If you wanted to skip rows where the {Phase/Milestone} is blank, you would add another range/criteria set saying as much.
=IFERROR(INDEX(COLLECT({Phase/Milestone}, {Phase/Milestone}, @cell <> "", ……………………………….
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Answers
-
What do you get if you remove the IFERROR portion?
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
Oddly, I get nothing. Just a blank cell. I also tried adding test to the IFError ("Error", instead of "").
-
So that means you are getting at least one row found that matches the range/criteria sets of the box being checked and the date being in the future, but the first row that matches that criteria is blank in the {Phase/Milestone} range. Try applying a filter to the source sheet to match the range/criteria sets and see if this is true.
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
Paul, Thank you for your help with this. I appreciated the order of the logic that you bring to this. I have checked all of the columns, and there is text, boxes checked and dates. I have checked this multiple times.
I changed the reference in the Index range (it was looking at Phase/Milestone), so that it was looking at tasks, and it returned a task, though it was not on the row I would have thought, it was a with a start date 1 day later (12/24/24 rather that 12/23/24). I was under the impression that this would always return the first cell that matched the criteria.
-
@Paul Newcome Thank you for your help, it help me finally figure it out!
-
Happy to help. 👍️
The logic used in your formula won't necessarily return the earliest date. The COLLECT function pulls a list together of all rows that match the range/criteria sets from top to bottom with no special sorting or anything. The INDEX/1 pulls the first entry from the list generated by the COLLECT function.
If you wanted to skip rows where the {Phase/Milestone} is blank, you would add another range/criteria set saying as much.
=IFERROR(INDEX(COLLECT({Phase/Milestone}, {Phase/Milestone}, @cell <> "", ……………………………….
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63K Get Help
- 379 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 304 Events
- 34 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!