Index Collect with date within 7 days

Justin Mauzy
βββββ
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
Want to practice working with formulas directly in Smartsheet?
Check out the Formula Handbook template!
Check out the Formula Handbook template!