Hi guys!
I need a non-macro formula to help solve the following scenarios. Ideally this formula would be all encompassing (to include other scenarios as well if something similar were to come up in the future):
Scenario 1:
Start Time End Time
A 12:00:00 AM 12:00:00 AM
B 6:00:00 PM 6:00:00 AM
Scenario 2:
Start Time End Time
A 12:00:00 AM 6:00:00 AM
B 6:00:00 PM 6:00:00 AM
Scenario 3:
Start Time End Time
A 6:00:00 PM 2:00:00 AM
B 6:00:00 PM 6:00:00 AM
Scenario 4:
Start Time End Time
A 8:00:00 AM 5:00:00 PM
B 6:00:00 PM 6:00:00 AM
If A occurs between B (or vice versa), then calculate how many hours from A occur between B. So it should calculate the following:
Scenario 1: 12 hours
Scenario 2: 6 hours
Scenario 3: 8 hours
Scenario 4: 0 hours (Because A does not occur between B)
This can be broken down into several simpler formulas which would show the steps to get to the final answer.
Thanks so much for your help!
Bookmarks