Formulas and Functions

Formulas and Functions

Ask for help with your formula and find examples of how others use formulas and functions to solve a similar problem.

Rental Availability Formula

I am trying to make a formula in smartsheets where I can check availability. We have a current schedule that consists of events where a trailer is booked out between dates. I have formula that will give me the daily count of how many trailers are booked on a particular day.

=11 - (COUNTIFS([Restroom Trailer]:[Restroom Trailer], "2 Stall Restroom Trailer", [Task Type]:[Task Type], "Long Term Event", [Event (or Job) Start Date]:[Event (or Job) Start Date], @cell <= [Event (or Job) Start Date]@row, [Event (or job) End Date]:[Event (or job) End Date], @cell >= [Event (or Job) Start Date]@row)) - (COUNTIFS([Restroom Trailer]:[Restroom Trailer], "2 Stall Restroom Trailer", [Event (or Job) Start Date]:[Event (or Job) Start Date], AND(@cell >= [Event (or Job) Start Date]@row, @cell <= [Event (or Job) Start Date]@row), [Task Type]:[Task Type], "Event"))

What I'm trying to figure out is how to plug in an example date range to check availability on particular trailer sizes. Viewing this as a gantt does not work well. I have created a report to try and view this with no success either. Using filters has not quite given me what I need either. Although a combination of these could work in some way.

Basically I want to input a range of two dates and have it spit out the number of trailers available during those two dates based on what is already booked.

Does anyone have a formula that calculates availability based off existing events booked?

Tags:

Best Answer

  • Answer ✓

    Paul, I was able to figure it out:

    =17 - (MAX(COLLECT(CHILDREN([Event/Customer]130), CHILDREN([Event (or Job) Start Date]130), @cell >= [Event (or Job) Start Date]130, CHILDREN([Event (or Job) Start Date]130), @cell <= [Event (or job) End Date]130))) + " 2 Stalls Available"

    Thank you for all your help!

«1

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!

Trending in Formulas and Functions