Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I am trying to create a VBA code based on what I have found in similiar
questions and I am failing miserably. Basically I need my text in cells B7, B8, B9, B10 and B11 to format as red/bold if any of the names listed in a cell matches a name listed in cells B2, B3, B4, B5 or B6. Private Sub Worksheet_Change(ByVal Target As Range) Dim icolor As Integer If Not Intersect(Target, Range("B7:B11")) Is Nothing Then Select Case Target Case Is = "B2" icolor = 6 Case Is = "B3" icolor = 6 Case Is = "B4" icolor = 6 Case Is = "B5" icolor = 6 Case Is = "B6" icolor = 6 Case Else 'Whatever End Select Target.Interior.ColorIndex = icolor End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Conditional formats- paste special formats? | Excel Discussion (Misc queries) | |||
paste conditional formats as formats | Excel Discussion (Misc queries) | |||
More than 3 conditional formats | Excel Discussion (Misc queries) | |||
Conditional Formats | Excel Discussion (Misc queries) | |||
Using Conditional Formats | Excel Discussion (Misc queries) |