View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default Conditional Formating - Time difference

Highlight column A:

CF 1: Formula is: =AND(A1<"",B1<"",(B1-A1+(B1<A1))*248) and set to green
CF2: Formula is: ==AND(A1<"",B1<"",(B1-A1+(B1<A1))*24<=8) and set to red

Repeat for column B

HTH

"Roman" wrote:

I have 2 columns, Column A for 'Arrival Time' and Column B for 'Departure
Time' .
If the 'departure Time' minus 'Arrival Time' is greater than 8 hrs,
background color of both the columns A and B should be changed to green,
otherwise color should be red. How can I achieve this using conditional
formatting?