INDEX COLLECT Multiple Values that match a date range
Hello community!
I want to return the name of every BROADCAST that falls within the date range where I have a contractor coming on site at my office.
In my contractor sheet I have a start and finish date column.
Contractor Start: 02/20/24 Contractor Finish: 02/21/24
In my Broadcast sheet, I have over 100 broadcasts spanning over the year.
My first formula in my contractor sheet tells me how many broadcasts clash with my contractor date range - this is working perfectly.
=COUNTIFS({Start}, [Start Date]@row >= @cell, {Finish}, [Finish Date]@row <= @cell, {B/M.}, "BROADCAST")
The value returned is 3. As there are 3 values (3 broadcasts) that clash, I want to somehow return the name of all 3 of these broadcast values. Here is the formula I have:
=INDEX(COLLECT({Broadcast}, {Start}, [Start Date]@row >= @cell, {Finish}, [Finish Date]@row <= @cell), 1)
I need to add an if statement to this formula so that it only reads the dates that are broadcast items (I have a helper column for this I just need to know how to utilise it within an index collect formula).
Then I need it to return all 3 values in a list.
Does anyone know if this is possible?
Best Answer
-
The first thing to do is to add another range/criteria set to evaluate the helper column that indicates whether or not it is a broadcast so that you can further filter by broadcast vs not.
Then you need to switch from an INDEX to a JOIN. INDEX will only ever pull one instance. The JOIN will display multiple instances.
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
-
The first thing to do is to add another range/criteria set to evaluate the helper column that indicates whether or not it is a broadcast so that you can further filter by broadcast vs not.
Then you need to switch from an INDEX to a JOIN. INDEX will only ever pull one instance. The JOIN will display multiple instances.
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!
-
Amazing thanks for your help again Paul! I'll figure out the rest
-
Happy to help. 👍️
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
- 62.8K Get Help
- 376 Global Discussions
- 207 Industry Talk
- 440 Announcements
- 4.5K Ideas & Feature Requests
- 139 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 284 Events
- 33 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!