Return Date that falls within 10 days of another date
So essentailly we have 2 sheets. On 1 sheet we have a list of test dates(call it test dates). Then on the main sheet we a column for due dates for certain documents where if not turned in Student would be locked out and can not take tests. So we want to have another column on the main sheet that pulls dates from the test dates sheet if a test date is within 10 days of a date in the due documents column.
Best Answer
-
Found the issue with it. It's the +10 it needs to be in parenthesis. I also added Iferror formula and it just leaves it blank if the date doesn't occur within the timeframe. Also make sure the column your formula is in is set up as a Date column.
=IFERROR(INDEX(COLLECT({Test Date}, {Test Date}, <=([Due Date]@row+10)), 1), "")
Also if you need to add additional search criteria you can add it to the formula. This is assuming the criteria you want to search is on the test sheet and the criteria is on the main sheet where the formula occurs.
=IFERROR(INDEX(COLLECT({Test Date}, {Test Date}, <=([Due Date]@row+10),{Column you want to search},[criteria to search for]@row), 1), "")
Answers
-
I would try the below. Dates can be finicky so not positive it will work. You will have to create your references.
=Index(Collect({Test Date},{Test Date},<=[Due Date]@row+10),1)
-
Hi Hollie thanks for the input. Sadly this gives me a INVALID OPERATION error
-
Found the issue with it. It's the +10 it needs to be in parenthesis. I also added Iferror formula and it just leaves it blank if the date doesn't occur within the timeframe. Also make sure the column your formula is in is set up as a Date column.
=IFERROR(INDEX(COLLECT({Test Date}, {Test Date}, <=([Due Date]@row+10)), 1), "")
Also if you need to add additional search criteria you can add it to the formula. This is assuming the criteria you want to search is on the test sheet and the criteria is on the main sheet where the formula occurs.
=IFERROR(INDEX(COLLECT({Test Date}, {Test Date}, <=([Due Date]@row+10),{Column you want to search},[criteria to search for]@row), 1), "")
-
That did it thanks!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!