Here is a tough one - Identify Route Blackouts

I need to schedule work on a particular route. Within my records I have a column named "Route" that shows the route number. EX: 10402. I have a DATE column called "Target". I want to add a column called "B/O Check" and write a formula that will take my target date and route number, look that data up in a sheet called "MW Route Blackouts" and return if that date is within a blackout or not and also how many days are left in the blackout. EX: "BO +7" or "Good +4" (if not in blackout). Show if I went to my sheet today and selected Monday 6/3 as my "Target" for a record that is on route 10402. My [B/O Check]@row would return "BO +10". Telling me my target date will be in blackout on that day and for an additional 10 days after my target date.

This is probably pretty easy for some of you Rockstars…

Tags:

Best Answer

  • Paul Newcome
    Paul Newcome Community Champion
    Answer ✓

    The INVALID COLUMN VALUE error means that you are trying to put a non-date value into a date type column, but after looking at the formulas I gave you for testing, I realized that the larger one I gave you didn't actually account for the [Area-Route]. Try this in the BO Check column:

    =IF(COUNTIFS({Route Blackouts V1 Area-Route}, @cell = [Area-Route]@row, {Route Blackouts V1 Start}, @cell <= [Target Date]@row, {Route Blackouts V1 End}, @cell >= [Target Date]@row) = 0, "Good", "BO") + " +" + (MIN(COLLECT(IF(COUNTIFS({Route Blackouts V1 Area-Route}, @cell = [Area-Route]@row, {Route Blackouts V1 Start}, @cell <= [Target Date]@row, {Route Blackouts V1 End}, @cell >= [Target Date]@row) = 0, {Route Blackouts V1 Start}, {Route Blackouts V1 End}), IF(COUNTIFS({Route Blackouts V1 Area-Route}, @cell = [Area-Route]@row, {Route Blackouts V1 Start}, @cell <= [Target Date]@row, {Route Blackouts V1 End}, @cell >= [Target Date]@row) = 0, {Route Blackouts V1 Start}, {Route Blackouts V1 End}), @cell >= [Target Date]@row, {Route Blackouts V1 Area-Route}, @cell = [Area-Route]@row)) - [Target Date]@row)


«1

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!