LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 9,221
Default CF sheet sub modifications

Seeking help to modify the sub below to conditionally format cols A to T
based on numbers in key col U (in U2:U100). Currently it CF's only the range
U2:U100. And for viewing clarity, how to add lines to the sub so that the
font color will "contrast" with the fill color (eg black font for light
fills, white for dark fills). Thanks.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim icolor As Integer
If Not Intersect(Target, Range("U2:U100")) Is Nothing Then
Select Case Target
Case 1 To 5
icolor = 6
Case 6 To 10
icolor = 12
Case 11 To 15
icolor = 7
Case 16 To 20
icolor = 53
Case 21 To 25
icolor = 15
Case 26 To 30
icolor = 42
Case Else
'Whatever
End Select
Target.Interior.ColorIndex = icolor
End If
End Sub


 
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
IF Statement Modifications Workbook Excel Worksheet Functions 9 February 19th 09 01:55 PM
modifications on the code George Excel Programming 3 October 9th 07 07:11 PM
webbrowser - excel - modifications [email protected] Excel Discussion (Misc queries) 1 January 26th 06 04:31 AM
How do I check modifications of file on server Alan[_28_] Excel Programming 1 November 13th 04 11:12 PM
Modifications to Permutation Macro Henrik[_2_] Excel Programming 1 October 24th 03 06:53 PM


All times are GMT +1. The time now is 09:31 AM.

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"