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
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!