Time variance formula

Burwell

New Member
Joined
Dec 10, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Good Afternoon.

I have a list of Planned arrival times and a list of actual arrive times and looking for an excel formula to highlight if their is a 15 min variance both earlier or later than the original planned time?

Hoping someone can help

Thank you
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
When asking an Excel question, always give the details about what your data looks like, and what cells it is in. Is your data in rows? Columns? Which ones?

For this response I will assume that your planned times are in column A starting in row 1, and your actual times are in column B starting in row 1.

I have assumed that by "15 min variance both earlier or later" you mean "at least a 15 min variance both earlier or later".

You used the word "highlight" so you want to use conditional formatting. Select columns A and B and then create a conditional formatting rule using a formula:

Excel Formula:
=ABS($A1-$B1)>=TIME(0,14,0)
 
Upvote 0
Hi Burwell,

Time without a date is always tricky as spanning midnight takes you to the next day. Here I'm assuming that if your actual is less than the planned by more than 12 hours then it's the next day.

Burwell.xlsx
EFG
1Planned ArrivalActual ArrivalVariance hh:mm
212:3012:4200:12
313:4514:0400:19
415:0012:0003:00
516:1516:3900:24
617:3017:3000:00
718:4518:5500:10
820:0019:5500:05
921:1520:4500:30
1022:3022:4400:14
1123:451:3001:45
121:002:2201:22
132:153:0800:53
143:3015:3012:00
154:4516:0011:15
166:006:1100:11
1st
Cell Formulas
RangeFormula
G2:G16G2=TEXT(ABS(IF(F2+TIME(12,0,0)<E2,1+F2,F2)-E2),"hh:mm")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F2:F18Expression=ABS(IF(F2+TIME(12,0,0)<E2,1+F2,F2)-E2)>TIME(0,15,0)textNO
 
Upvote 0

Forum statistics

Threads
1,214,789
Messages
6,121,605
Members
449,038
Latest member
Arbind kumar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top