I have a spreadsheet that users enter the data into a form and it appends to the spreadsheet (Entry)
What I am trying to do is go through the cells and do some checks for 2 many loads arriving in a time window.
Hub DTMI has 3 fruit loads arriving on 07/07/07 between the hours of 14:23 & 18:58. Depending on the volume on the trailer to unload we can only recieve 2 trailers within a 6 hour window.
So the first trailer arrives at 14:23 takes approx 7 hours to unload putting it's finish time at about 21:00
The next trailer arrives at 18:54 and will take approx 4 hours to unload putting it's finish time about 22:30
The next trailer they schedule to arrive is 18:58 but there are already 2 loads out there meaing the next load can't arrive in our yard until 21:00 to be unloaded.
Is there a way to flag that entry based on Hub Name, Date of Arrival and Finish Times or Arrival Time
I included the spreadsheet highlighting the row with Red that would be a problem.
I would suggest a VBA macro for this. You might have columns like this: Loc, Name, Date In, Est Time In, Est Hrs, Date Out, Est Time Out. Program a macro that will prompt you (with an input box) for two things: the date in, and the estimated hours (or, if you prefer, the quantity of packages, which can be divided). Give the macro the smarts to read the columns and decide the proper location (either 1 or 2) and estimate the earliest time in available, as well as the hours and estimated date/time out. The macro should either tell you (display) or actually fill in the appropriate cells with this info. You can then fill in the rest of the columns manually. (BTW, by Name I mean trucking company name.)