Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Conditional Formating - Time difference

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?
  #2   Report Post  
Posted to microsoft.public.excel.misc
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?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,726
Default Conditional Formating - Time difference

alternatives

=AND(COUNT(A1:B1)=2,MOD(B1-A1,1)*248)

=AND(COUNT(A1:B1)=2,MOD(B1-A1,1)*24<=8)

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Toppers" wrote in message
...
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?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Time difference calculations, daylight savings time, Excel Tim Excel Discussion (Misc queries) 1 December 28th 06 04:18 PM
Help with Conditional Formating Time jonhunt Excel Worksheet Functions 3 July 13th 06 09:02 PM
Install dates formating using conditional formating? Jerry Eggleston Excel Discussion (Misc queries) 2 November 9th 05 05:49 PM
Negative time should be allowed in Excel, eg time difference Bengt-Inge Larsson Excel Discussion (Misc queries) 2 October 13th 05 12:59 PM
Time / Formula to look at time difference carl Excel Worksheet Functions 5 November 8th 04 06:59 PM


All times are GMT +1. The time now is 04:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"