LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Condition Formatting in code. How?

I have got so far but i get an error now in this:

Sub Shades()
worksheets("Print & Shading Page").Select
Dim cell As Range
Dim PSP As Worksheet
For Each cell In worksheets("Print & Shading Page").Range("c8:r30")
With cell
If .Value < "" Then
PSP.Range(.Address).Value = TODAY() < 1
With Selection.Interior
.ColorIndex = 38
.Pattern = xlSolid
End With
Else
End If
If .Value < "" Then
PSP.Range(.Address).Value = TODAY() < 14
With Selection.Interior
.ColorIndex = 36
.Pattern = xlSolid
End With
Else
End If
If .Value < "" Then
PSP.Range(.Address).Value = TODAY() < 30
With Selection.Interior
.ColorIndex = 35
.Pattern = xlSolid
End With
Else
End If
If .Value < "" Then
PSP.Range(.Address).Value = TODAY() 1
With Selection.Interior
.ColorIndex = 2
.Pattern = xlSolid
End With
End If
End With
Next
End Sub

Any idea's where i am going wrong?

Corey....
 
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
Formatting / Condition Help ?? Kim Excel Discussion (Misc queries) 9 September 24th 09 03:59 PM
code to check condition for each row Horatio J. Bilge, Jr. Excel Discussion (Misc queries) 3 February 10th 09 08:07 PM
Condition Formatting in code. How? Barb Reinhardt Excel Programming 0 August 11th 06 02:28 PM
I need 4 condition for condition formatting SeeKY Excel Programming 2 June 7th 05 09:41 AM
Condition added to Sort Code Todd Huttenstine[_3_] Excel Programming 1 January 2nd 04 09:35 AM


All times are GMT +1. The time now is 01:27 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"