Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 5
Exclamation 2007 conditional formatting not playing ball

So I have a spread sheet that has the following formula
=IF(VALUE(G5)<H5,"Breached",VALUE(G5)-H5)

The Colum is formatted to be time as that is what it is calculating. This part is working fine.

What I am then trying to do is to apply the following conditional formatting
Cell Value = Breached - the cell is formatted Pink
Cell Value less than 09:00:00 - The cell is formatted red
Cell Value between 9:00:01 and 15:00:00 - The cell is formatted Orange
Cell Value between 15:00:01 and 30:00:00 - The cell is formatted Yellow
Cell Value greater than 30:00:01 - The cell is formatted Green

They are set up in this order. The Breach formatting works but the rest are not working.

Ie I have a few cells that are displaying 0:25:30 that are green and should be red.

What am I doing wrong?
  #2   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by Mujer View Post
So I have a spread sheet that has the following formula
=IF(VALUE(G5)<H5,"Breached",VALUE(G5)-H5)

The Colum is formatted to be time as that is what it is calculating. This part is working fine.

What I am then trying to do is to apply the following conditional formatting
Cell Value = Breached - the cell is formatted Pink
Cell Value less than 09:00:00 - The cell is formatted red
Cell Value between 9:00:01 and 15:00:00 - The cell is formatted Orange
Cell Value between 15:00:01 and 30:00:00 - The cell is formatted Yellow
Cell Value greater than 30:00:01 - The cell is formatted Green

They are set up in this order. The Breach formatting works but the rest are not working.

Ie I have a few cells that are displaying 0:25:30 that are green and should be red.

What am I doing wrong?
Have a look at the attached. Does this do what you need?
Attached Files
File Type: zip Mujer Example.zip (5.5 KB, 61 views)

Last edited by Spencer101 : July 24th 12 at 08:36 AM
  #3   Report Post  
Junior Member
 
Posts: 5
Default

Quote:
Originally Posted by Spencer101 View Post
Have a look at the attached. Does this do what you need?
The attached does do what I need and I replicated that into my spread sheet, but its still not playing ball.

I have attached a copy of what I am trying to get to work with the formula replicated, a lot of them are still coming up as green that should be red etc
Attached Files
File Type: zip Conditional Formatting.zip (28.2 KB, 63 views)
  #4   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by Mujer View Post
The attached does do what I need and I replicated that into my spread sheet, but its still not playing ball.

I have attached a copy of what I am trying to get to work with the formula replicated, a lot of them are still coming up as green that should be red etc
It's because you're dealing with date and time in the same cells.

Two ways round this:

1) Split the time and date into separate cells (perhaps not ideal)

2) Add MOD(cell,1) into the conditional formatting formulas.

So for example the formula for red would be =AND(I1<"Breached",MOD(I1,1)<=0.3375) rather than =AND(I1<"Breached",I1<=0.3375)

You would need to do that to all of the last 4 conditional formatting formulas.
Does that work for you?
  #5   Report Post  
Junior Member
 
Posts: 5
Default

Thank you Spencer, you are a life saver... It looks like it is now working a treat


  #6   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by Mujer View Post
Thank you Spencer, you are a life saver... It looks like it is now working a treat
Not a problem. Happy to help. :)
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
2002 excel isn't playing well with 2007 [email protected] Excel Programming 1 August 17th 09 05:26 PM
Conditional Formatting 2007 Steved Excel Worksheet Functions 3 November 22nd 07 11:51 PM
Detecting the actual playing or NOT playing of a WAV file Bajbaj Excel Discussion (Misc queries) 0 October 24th 07 09:16 PM
Conditional formatting not playing ball Jock Excel Discussion (Misc queries) 1 September 11th 07 05:36 PM
Conditional formatting not playing ball (2) Jock Excel Discussion (Misc queries) 3 September 11th 07 04:46 PM


All times are GMT +1. The time now is 03:34 PM.

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"