if statement needed?

chearn

New Member
Joined
Jan 24, 2005
Messages
14
My cell is foratted for :mm:ss , how do i format the cell for the following statement?

If the time is greater than :04:01 but less than :59:59 bold the font and highlight the cell

I am lost
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Greg Truby

MrExcel MVP
Joined
Jun 19, 2002
Messages
10,021
<ul>[*]Format | Conditional Format... .[*]Cell Value Is.[*]Between.[*]Box1: =time(0,4,2).[*]Box2: =time(0,59,58).[*]Set font and shading properties to your desire.[/list]

HTH
 

Zack Barresse

MrExcel MVP
Joined
Dec 9, 2003
Messages
10,881
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
  3. Web
Hi chearn, welcome to the board!


You could use conditional formatting. I placed these values in some adjacent cells ..
Book2
ABCDE
1Minutes459
2:04:01:04:01Seconds159
3:04:02:04:02NumberV0.0027893520.041655093
4:04:03:04:03:04:01:59:59
5:04:04:04:04
6:04:05:04:05
7:59:51:59:51
8:59:52:59:52
9:59:53:59:53
10:59:54:59:54
11:59:55:59:55
12:59:56:59:56
13:59:57:59:57
14:59:58:59:58
15:59:59:59:59
16:00:00:00:00
17:00:01:00:01
18:00:02:00:02
19:00:03:00:03
Sheet1



Selecting A2:A19, I went to Format --> Conditional Formatting --> Formula Is ...

Code:
=(A2<>"")*((A2-INT(A2)>$D$4)*(A2-INT(A2)<=$E$4))

Hope this helps.


Note: The Conditional Formatting does NOT show up using Colo's HTML Maker that I posted with. The cells were formatted after the fact to show you which results came up.
 

Forum statistics

Threads
1,148,272
Messages
5,745,790
Members
423,973
Latest member
man_this_is_hard

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top