Find next entry date
Hi all,
I'm currently trying to figure a formula that would find the next entered date for specific tools from my Rental Out column to populate the Rental In column. We have a system that tracks the movement of our tools and I'd like to find the next date entered by specific tools to track the duration the tool was on certain sites.
For example, row 7 Hammer, the Rental In would be 02/07/21 which corresponds to the next entered date for the hammer. Row 6 Ladder, Rental In would be 23/06/21, row 5 Rental In would be 29/06/21, etc.
Any ideas?
Best Answer
-
My initial thought would have been to use the MAX/COLLECT solution.
Since that isn't working, try this...
=MIN(COLLECT([Rental Out]:[Rental Out], [Rental Out]:[Rental Out], @cell > [Rental Out]@row, Tool:Tool, @cell = Tool@row))
If it still isn't working, make sure that both of the date columns are in fact set to date type columns.
Answers
-
Try the below setup.
Add the below 2 columns:
- "LINE-ID" : Auto Number Column
- "ROW#" : Column Formula: "=MATCH([LINE-ID]@row, [LINE-ID]:[LINE-ID], 0)
Make your Rental In formula as follows:
=INDEX([Rental Out]:[Rental Out],MAX(COLLECT([ROW#]:[ROW#], [ROW#]:[ROW#], <[ROW#]@row, [Tool]:[Tool], [Tool]@row)))
Please note this assumes (based on your description) that all new lines have been added from the top.
Another possible option is:
=MAX(COLLECT([Rental Out]:[Rental Out], [Rental Out]:[Rental Out], <[Rental Out]@row))
-
Unfortunately this didn't work, comes up as NO MATCH. To simplify what I'm trying to achieve, I need to find the next entered date for any specific item.
-
Which formula did you choose?
See below slightly revised for the second option:
=MAX(COLLECT([Rental Out]:[Rental Out], [Rental Out]:[Rental Out], <[Rental Out]@row, Tool:Tool, Tool@row))
-
I tried the first one, but the revised second one doesn't work as well. Comes up No Match. I had been trying something similar with no luck.
-
Here is another example of what I'm trying to find. Rental In would be where the formula would be, colour coded with the data it would search and find which corresponds for the next entered date for that particular item.
-
Are both the Rental in and Rental Out fields a 'Date' Column type?
-
My initial thought would have been to use the MAX/COLLECT solution.
Since that isn't working, try this...
=MIN(COLLECT([Rental Out]:[Rental Out], [Rental Out]:[Rental Out], @cell > [Rental Out]@row, Tool:Tool, @cell = Tool@row))
If it still isn't working, make sure that both of the date columns are in fact set to date type columns.
-
Thank you so much, the MIN(COLLECT) worked perfectly.
-
Happy to help. 👍️
That second screenshot was what clued me in. For future reference... When posting questions to the Community, screenshots are always helpful, and (when possible) a screenshot with manually entered data that shows the desired outcome can really go a long way towards finding the most appropriate solution.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 497 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!