Index Collect with date within 7 days
Here is the setup:
I have two sheets:
- November Schedule (where the formula will live)
- Columns
- Completion Date (Date Column)
- Hidden Lead Tech (Formula lives here)
- Columns
- Historical Roster
- Columns
- Created (Date Column)
- Lead Tech
- {Historical Roster Range 1} is the Lead Tech column
- {Historical Roster Range 2} is the Created column
- Columns
I have this formula working but only if the dates match:
=IFERROR(INDEX(COLLECT({Historical Roster Range 1}, {Historical Roster Range 2}, [Completion Date:]@row), 1), "")
I need the formula to return the Lead Tech if the Completion Date is within the last 7 days of the Created Date.
Thanks in advance for the help.
Best Answer
-
Hey @Justin Mauzy
Will this work for you?
=IFERROR(INDEX(COLLECT({Historical Roster Range 1}, {Historical Roster Range 2}, AND(ISDATE(@cell), @cell <= [Completion Date:]@row, @cell >= [Completion Date:]@row - 7)), 1),"")
Kelly
Answers
-
Hey @Justin Mauzy
Will this work for you?
=IFERROR(INDEX(COLLECT({Historical Roster Range 1}, {Historical Roster Range 2}, AND(ISDATE(@cell), @cell <= [Completion Date:]@row, @cell >= [Completion Date:]@row - 7)), 1),"")
Kelly
-
That worked perfectly. Thank you for the quick response.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.3K Get Help
- 423 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 144 Just for fun
- 59 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!