Results 1 to 23 of 23

Change cell color w/o using conditional formula

Threaded View

  1. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Change cell color w/o using conditional formula

    Adjust the range to the column and cell range you want "watched", then put this macro into the sheet module:
    Sub worksheet_calculate()
    Dim cell As Range, rng As Range
    Set rng = Range("K5:K70")
    
    For Each cell In rng
        If cell.Value = "Selfpay" Then
            With cell.Interior
                .ColorIndex = 3
                .Pattern = xlSolid
            End With
        Else
            cell.Interior.ColorIndex = xlNone
        End If
    Next cell
    End Sub
    Last edited by JBeaucaire; 03-10-2009 at 02:20 PM. Reason: Fixed color to change to RED.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1