Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Sep 2002
    Edmonton, Alberta
    Thanked 0 Times in 0 Posts

    Excel Time Calculation Formula (2003)

    How would I create a formula to calculate the difference between start time and a end time and format it Yellow if it is less than a 20 min. period and format it Red if it is 20 minutes or greater?
    Thank you in Advance.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 28 Times in 28 Posts

    Re: Excel Time Calculation Formula (2003)

    Say that the start time is in cell A1 and the end time in cell B1. The formula to calculate the difference is simply


    You can set the color to yellow as default, and use conditional formatting to change it to red if the difference is 20 minutes or more:
    - Select the cell(s) with the formula.
    - Select Format | Conditional Formatting...
    - Select "Cell value is" from the first dropdown list (this is the default).
    - Select "Greater than" from the second dropdown list.
    - Enter =TIME(0,19,59) in the box next to it.
    - Click Format... and set the color you want in the Font or Pattern tab.
    - Click OK twice.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts