×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# Conditional formating for time

## Conditional formating for time

(OP)
All,
I have a spreadsheet that calculates the amount of hours worked each week. I am able to calculate the amount of variance between what was worked and the standard. My problem is I want to show if this varaince is +ve or -ve.
For example
Standard hours = 37 in cell A1
Hours worked = 35:25 in cell A2
Variance = if(A2*24<A1,A1-a2*24,A2*24-A1)/24
and hece I get 1:35 as my answer which is correct. Now I want to use conditional formatting by turning the cell red to show that this is under the required hours - HOW??
All help would be appreciated.
Regards

### RE: Conditional formating for time

I suggest you do the following:
In A1 enter 37:00 (so it will be automatically converted to a time value, like your entry in A2). The value will be 1.54166666666667, to be precise (which is the number of days).
In the variance cell, A3 for example, you write the formula =ABS(A1-A2), and format it as time (hh:mm:ss).
In the variance cell, choose Format|Conditional Formatting and select Formula Is from the drop down box, and type =A2<A1 in the formula box. Select the format button to specify the cell formatting in case the hours worked (A2) are less than the required hours (A1).

Cheers,
Joerd

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Close Box

# Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!