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: 3,355
Default Conditional Formating on Worksheet Change

I've found this macro and I wonder what might need to be changed to do what I
want to do:

http://www.ozgrid.com/VBA/excel-cond...ting-limit.htm

Private Sub Worksheet_Change(ByVal Target As Range)
Dim icolor As Integer

If Not Intersect(Target, Range("A1:A10")) 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

The range I want to format is B1:T14 and the formulas I want to use a

To color cell B2: Formula currently in place is

If AB2 =6, Highlight color = 3
If AB2 = 5, Highlight color = 45
IF AB2 =4, Highlight color = 6
If AB2 =3, Highlight color = 5
IF AB2=2, Highlight color = 13
If AB2 = 1, Highlight color = 39

For C2, I'm checking against AC2.

Can someone assist?

Thanks in advance,
Barb Reinhardt
 
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
Conditional Formating with Icon set - How to change the color Jocelyn[_2_] Excel Discussion (Misc queries) 5 April 3rd 23 04:40 PM
Change color without conditional formating spacesyco Excel Discussion (Misc queries) 5 March 20th 07 10:42 PM
Conditional formating-change color of cells over than one with for carrera Excel Discussion (Misc queries) 4 November 28th 06 07:49 AM
Conditional Formating - Change Color hfazal Excel Programming 1 February 15th 06 06:39 PM
How to change an entire row using conditional formating John Edwards Excel Discussion (Misc queries) 2 December 9th 04 05:41 PM


All times are GMT +1. The time now is 07:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"