How to avoid hitting the F2 key to invoke "conditional formatting"

I tweaked some inherted code that did conditional formatting beyond what is available through plain excel.  The code (see attached) works perfectly...I am just looking for a way not to laboriously hit the F2 key to change all of my 380 cell references in my table of data.  Any help would be greatly appreciated.
Private Sub Worksheet_Change(ByVal Target As Range)

Dim icolor As Integer



    If Not Intersect(Target, Range("b80:k116")) Is Nothing Then

        Select Case Target

            Case "Book Value per Share to Price", "Cashflow per Share to Price", "Dividend Yield", "Earnings per Share to Price", "EBITDA to EV", "EBITDA to Price", "IBES Dividend Yield", "IBES Earnings Yield", "IBES Sales Yield", "Sales per Share to Price", "Sales to EV"

                icolor = 5
                Target.Font.Color = RGB(255, 255, 255)
                
            Case "Growth in Earnings per Share", "IBES 12 Month Forward  Growth in Earnings per Share", "IBES Earnings Long Term Growth", "IBES FY1  Earnings Revisions 1M Sample", "IBES FY1  Earnings Revisions 3M Sample", "IBES FY2  Earnings Revisions 1M Sample", "IBES FY2  Earnings Revisions 3M Sample", "IBES Sales 12 Mth Growth", "IBES Sales Long Term Growth", "Income to Sales", "Return on Equity", "Sales Growth", "Sustainable Growth Rate"

                icolor = 4
                Target.Font.Color = RGB(255, 255, 255)
               
            Case "Beta", "Market Cap"

                icolor = 3
                Target.Font.Color = RGB(255, 255, 255)
                
            Case "Momentum 12 Mth", "Momentum 6 Mth", "Momentum Short Term (6 Month Exp Wtd)"

                icolor = 1
                Target.Font.Color = RGB(255, 255, 255)
                
            Case "Debt to Equity (High)", "Foreign Sales as a % Total Sales"

                icolor = 6
                Target.Font.Color = RGB(0, 0, 0)
                
            Case "Debt to Equity (Low)", "Low Accruals", "Stability Of Earnings Growth", "Stability Of FY1 Revisions", "Stability Of IBES 12 Mth Growth Forecast", "Stability of Returns", "Stability Of Sales Growth"

                icolor = 18
                Target.Font.Color = RGB(255, 255, 255)
                
                                 
            
            Case Else

                'Whatever

        End Select

        

        Target.Interior.ColorIndex = icolor

    End If



End Sub

Open in new window

majervisAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rory ArchibaldCommented:
You could alter the Change code as below and then add a new module with the other subs in it. You can then simply run the ColourThemAll sub as a one-off.
' Revised worksheet code:
Private Sub Worksheet_Change(ByVal Target As Range)

    If Not Intersect(Target, Range("b80:k116")) Is Nothing Then
        ColourCells Intersect(Target, Range("b80:k116"))
    End If

End Sub

' NEW MODULE

Sub ColourThemAll()
    ColourCells ActiveSheet.Range("b80:k116")
End Sub
Sub ColourCells(rngIn As Range)
    Dim rngcell As Range
    Dim iColor As Long
    For Each rngcell In rngIn
        With rngcell
            Select Case .Value
    
                Case "Book Value per Share to Price", "Cashflow per Share to Price", "Dividend Yield", "Earnings per Share to Price", "EBITDA to EV", "EBITDA to Price", "IBES Dividend Yield", "IBES Earnings Yield", "IBES Sales Yield", "Sales per Share to Price", "Sales to EV"
        
                    iColor = 5
                    .Font.Color = RGB(255, 255, 255)
                    
                Case "Growth in Earnings per Share", "IBES 12 Month Forward  Growth in Earnings per Share", "IBES Earnings Long Term Growth", "IBES FY1  Earnings Revisions 1M Sample", "IBES FY1  Earnings Revisions 3M Sample", "IBES FY2  Earnings Revisions 1M Sample", "IBES FY2  Earnings Revisions 3M Sample", "IBES Sales 12 Mth Growth", "IBES Sales Long Term Growth", "Income to Sales", "Return on Equity", "Sales Growth", "Sustainable Growth Rate"
        
                    iColor = 4
                    .Font.Color = RGB(255, 255, 255)
                   
                Case "Beta", "Market Cap"
        
                    iColor = 3
                    .Font.Color = RGB(255, 255, 255)
                    
                Case "Momentum 12 Mth", "Momentum 6 Mth", "Momentum Short Term (6 Month Exp Wtd)"
        
                    iColor = 1
                    .Font.Color = RGB(255, 255, 255)
                    
                Case "Debt to Equity (High)", "Foreign Sales as a % Total Sales"
        
                    iColor = 6
                    .Font.Color = RGB(0, 0, 0)
                    
                Case "Debt to Equity (Low)", "Low Accruals", "Stability Of Earnings Growth", "Stability Of FY1 Revisions", "Stability Of IBES 12 Mth Growth Forecast", "Stability of Returns", "Stability Of Sales Growth"
        
                    iColor = 18
                    .Font.Color = RGB(255, 255, 255)
                Case Else
        
                    'Whatever
        
            End Select
        
            
        
            .Interior.ColorIndex = iColor
        End With
    Next rngcell

End Sub

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
majervisAuthor Commented:
Thanks for the quick reply...perfect!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.