PDA

View Full Version : Solved: Conditional format



tqm1
07-08-2007, 08:59 PM
Reference:
http://www.excelforum.com/showthread.php?t=606283
http://www.puremis.net/excel/cgi-bin/yabb/YaBB.pl?num=1183723258

Dear Sir,

Column D has Time values as

01:10:15
05:12:18
18:28:23
13:42:58
22:17:29
08:12:47
00:47:02

I want to apply Green Backcolor of the values
those are between=05:15:25 - 18:45:55

If possible, please help with VBA Codes.

Please help

anandbohra
07-08-2007, 11:14 PM
this is the code
change the interior as u wish.

Sub green_backcolor ()
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _
Formula1:="0.219039351851852", Formula2:="0.781886574074074"
Selection.FormatConditions(1).Interior.ColorIndex = 4
End Sub

Bob Phillips
07-09-2007, 12:30 AM
An d as given in JMT, CF with a formula of

=AND(A1>=TIME(5,15,25),A1<=TIME(18,45,55))