Results 1 to 11 of 11

Macro To Highlight Range of a row a Certain Color Depending On Contents In a Cell

Threaded View

  1. #9
    Forum Contributor
    Join Date
    01-25-2009
    Location
    Louisiana
    MS-Off Ver
    Excel 2007
    Posts
    177

    Re: Macro To Highlight Range of a row a Certain Color Depending On Contents In a Cell

    Sub Testing()
    
    Dim LR As Long
    
    LR = Cells(Rows.Count, 3).End(xlUp).Row
    
    For i = 1 To LR
    If Cells(i, 3).Value = "D" Then
    Cells(i, 1).Resize(1, 5).Interior.ColorIndex = 3
    End If
    Next i
    
    For i = 1 To LR
    If Cells(i, 3).Value = "M" Then
    Cells(i, 1).Resize(1, 5).Interior.ColorIndex = 5
    End If
    Next i
    
    end sub
    I did it for jen, i cant edit her posts but i reposted the code in the proper #.
    Attached Files Attached Files
    Last edited by donnydorko; 09-17-2010 at 12:59 PM.

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