Lastest Update

Hi I have sheet - Incidents Recorded for the Month, which record the incidents that occuring within a month. see the pic below….
I want a formula that can return the latest Incident Description when a new incident is added. I have used the following formula -
=IFERROR(INDEX(COLLECT(CHILDREN([Incident Description]@row); CHILDREN([Record Date]@row); MAX(CHILDREN([Record Date]@row))); 1); "")
But this formula returns the 1st latest incident recorded.
Please advise
Best Answers
-
Hello @Morena
Try this:
=INDEX(COLLECT([Incident Description]:[Incident Description], [Incident Date]:[Incident Date], MAX([Incident Date]:[Incident Date])), 1)
Melissa Yamada
melissa@insightfulsheets.com
Data made simple, spreadsheets reimagined -
You wouldn't use the MATCH. You would use just another range/criteria set within the COLLECT function.
=IFERROR(INDEX(COLLECT(…………………………………………………………………………….; MAX(CHILDREN(Modified@row)); CHILDREN([Primary Column]@row), @cell = "MTC"); 1); "")
Answers
-
Hello @Morena
Try this:
=INDEX(COLLECT([Incident Description]:[Incident Description], [Incident Date]:[Incident Date], MAX([Incident Date]:[Incident Date])), 1)
Melissa Yamada
melissa@insightfulsheets.com
Data made simple, spreadsheets reimagined -
Thankx
I managed to make it work, now I need a formula that returns the latest incident description Added for ONLY Incident with "MTC"
-
Hi Guys
I used the following formula -
=IFERROR(INDEX(COLLECT(CHILDREN([Incident Description]@row); CHILDREN(Modified@row); MAX(CHILDREN(Modified@row))); MATCH("MTC"; CHILDREN([Primary Column]@row); 0)); "")
It works but the problem is that if the 1st row of the children is "MTC" then it's fine but if I change the 1st row of the children to "FAC" or something else then it returns a blank, some reason it picks up on the 1st of the children even if the 2nd row is something like "LTI" or "FAC", it will ignore and them if they are not on the 1st row of the children
-
You wouldn't use the MATCH. You would use just another range/criteria set within the COLLECT function.
=IFERROR(INDEX(COLLECT(…………………………………………………………………………….; MAX(CHILDREN(Modified@row)); CHILDREN([Primary Column]@row), @cell = "MTC"); 1); "")
-
Hello @Morena
Since you'll be adding another set of criteria you'd want to use COLLECT function instead of MATCH function as what Paul mentioned above.
Melissa Yamada
melissa@insightfulsheets.com
Data made simple, spreadsheets reimagined -
@Melissa Yamada @Paul Newcome Thanx! it working
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.1K Get Help
- 450 Global Discussions
- 155 Industry Talk
- 505 Announcements
- 5.4K Ideas & Feature Requests
- 85 Brandfolder
- 156 Just for fun
- 80 Community Job Board
- 514 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 308 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!