Results 1 to 6 of 6

Color if date in column n and stop color at column n

Threaded View

  1. #1
    Registered User
    Join Date
    11-13-2009
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    7

    Color if date in column n and stop color at column n

    I'm trying to change the color of a row if there is a date in column "N". I want it to only color from column "A" to "N" of that row. I have a code but it colors the entire row instead of stopping at "N".

    Sub RowColoring()
    'Applies different highlights to rows according to value in specified column
    Dim cel As Range, rg As Range
    Application.ScreenUpdating = False
    Set rg = [N4]   'First cell in column that needs to be checked
    Set rg = Range(rg, Cells(Rows.Count, rg.Column).End(xlUp))
    For Each cel In rg.Cells
        Select Case (">01/01/1990")
            Case Is > "01/01/1990"
                cel.EntireRow.Interior.ColorIndex = 35
        End Select
    Next
    Application.ScreenUpdating = True
    End Sub
    Last edited by dalet; 11-20-2009 at 09:49 AM. Reason: Mis-spelled and better explanation

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