Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default Conditional format a cell in time increments

I have a macro creating a time stamp to a cell "d" once the first cell "c" is
changed. How do I make the cell turn yellow after hours orange after 16 hours
and red after 24 hours?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Conditional format a cell in time increments

With the cell selected, click on Format | Conditional Formatting and
choose Formula Is rather than Cell Value Is in the first box. Put this
formula in the next box:

=cell_ref=1

Then click the Format button, Patterns tab and choose Red, then click
OK. Click Add to set up your next condition, and choose Formula Is and
put this formula in:

=cell_ref=16/24

Click the Format button and choose Orange on the Patterns tab, then
OK. Click Add once more, choose Formula Is and enter this formula:

=cell_ref=8/24

then Format button again and choose Yellow, then OK twice to exit the
dialogue box. cell_ref is the cell you have selected.

You should note that Excel stores times internally as fractions of a
24-hour day, hence the values 1, 16/24 and 8/24 above. I'm guessing 8
hours for the last one, as you missed this out in your post.

Hope this helps.

Pete

On Jul 22, 11:40*pm, Bojames
wrote:
I have a macro creating a time stamp to a cell "d" once the first cell "c" is
changed. How do I make the cell turn yellow after hours orange after 16 hours
and red after 24 hours?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default Conditional format a cell in time increments

YES. Thank you. You are correct on the 8 by the way.

"Pete_UK" wrote:

With the cell selected, click on Format | Conditional Formatting and
choose Formula Is rather than Cell Value Is in the first box. Put this
formula in the next box:

=cell_ref=1

Then click the Format button, Patterns tab and choose Red, then click
OK. Click Add to set up your next condition, and choose Formula Is and
put this formula in:

=cell_ref=16/24

Click the Format button and choose Orange on the Patterns tab, then
OK. Click Add once more, choose Formula Is and enter this formula:

=cell_ref=8/24

then Format button again and choose Yellow, then OK twice to exit the
dialogue box. cell_ref is the cell you have selected.

You should note that Excel stores times internally as fractions of a
24-hour day, hence the values 1, 16/24 and 8/24 above. I'm guessing 8
hours for the last one, as you missed this out in your post.

Hope this helps.

Pete

On Jul 22, 11:40 pm, Bojames
wrote:
I have a macro creating a time stamp to a cell "d" once the first cell "c" is
changed. How do I make the cell turn yellow after hours orange after 16 hours
and red after 24 hours?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Conditional format a cell in time increments

Lucky guess !! - Thanks for the feedback.

Pete

On Jul 23, 2:18*am, Bojames wrote:
YES. Thank you. You are correct on the 8 by the way.

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 Increments Andrew C Excel Worksheet Functions 1 February 10th 06 12:42 AM
i want to add increments of time not time & date Bella Excel Worksheet Functions 1 December 29th 05 05:56 PM
Time increments Ntisch New Users to Excel 4 September 29th 05 07:00 AM
Need formula to add increments of 0.16 seconds to time Tim Ashcom Excel Discussion (Misc queries) 2 July 19th 05 08:45 PM
How do I add time when some of the increments are less than an ho Learning Center Student New Users to Excel 1 May 18th 05 06:19 PM


All times are GMT +1. The time now is 05:15 AM.

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

About Us

"It's about Microsoft Excel"