Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel: Change cell color based on time

Status
Not open for further replies.

e2the1stpower

Technical User
Apr 15, 2008
8
US
I work in a computer room in a library and made something in excel to determine how long someone has been on a computer for. What I would like to do is have it so that after someone has been on a computer for an hour for the cell to turn red. I have no idea how to do this as I am basically just learning everything as I go. I have not been able to find a way to do this. I am doing this with Excel 2002 if it makes any difference. Thanks in advanced for any help.
 





Hi,

You can use Format > Conditional Formatting.
[tt]
Formula is: =A2+time(1,0,0)<NOW()
[/tt]
where A2 contains the TIME value (ctr+shift+:) that the customer begins.

Skip,

[glasses]Have you heard that the roundest knight at King Arthur's round table was...
Sir Cumference![tongue]
 
I agree with skip

cell value is =IF((A2+TIME(1,0,0)<NOW()),"Over 1 hour","")

under format go to conditional formating and make cell value equal to "Over 1 hour". Then format "pattern" red. You can change the format color if desired.

Regards
Peter Buitenhek
ProfitDeveloper.com
 



Peter,

Why put a formula in a column? Obviously you can, but it is not necessary.

Skip,

[glasses]Have you heard that the roundest knight at King Arthur's round table was...
Sir Cumference![tongue]
 



Caveat 1:
The TIME values in column A must ALSO contain the Date part or change the formula to...
[tt]
=A2+TIME(1,,0)+TODAY()<NOW()
[/tt]
Caveat 2:
YOU, the Excel user, must calculate the sheet (F9), whenever you want an up-to-date status.

Skip,

[glasses]Have you heard that the roundest knight at King Arthur's round table was...
Sir Cumference![tongue]
 
Thanks for the help. This actually helped me with two things I was trying to figure out. I thought I could use the conditional formatting just wasn't sure what to put in to get it to do what I wanted. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top