Results 1 to 42 of 42

VBA Conditional Formatting - Change Font Color across row per 1st column (6 colors)

Threaded View

  1. #1
    Registered User
    Join Date
    11-06-2005
    Posts
    23

    VBA Conditional Formatting - Change Font Color across row per 1st column (6 colors)

    I need to find VBA code for:
    -- Changing the font color of part of a row (within a named range), based on the value of the cell in the first column of the row (within the range)
    -- I need at least 6 colors, each with a different criterion, so regular conditional formatting won’t work (I have Excel 2003).

    The file is a calendar for managing the schedules of employees of a small department, formatted as the attached fragment of the whole. The first column within each block of cells (block = a single date on the calendar) is a pull-down list of the initials of the employees. As I select a different employee or change that first cell, I want the font color to change for that cell and the cells to the right within that date block.

    I think I’ll need a different section of code for each day-of-the-week range, which I’ve named “Sunday” “Monday”, “Tuesday”, etc.

    I’d prefer to reference the employees by the named cell which contains their initials, i.e. “Name1” “Name3” “Name3”, etc, rather than the actual initials (“KG” “SB” etc), since employees may change.

    I know the color numbers for what I want:
    Name1 – 1
    Name2 – 3
    Name3 – 4
    Name4 – 7
    Name5 – 5
    Name6 – 46

    I’ve searched and tried various solutions from the web, but none seem to work quite right. The ones I’ve tried result in error messages, or the color for a particular cell gets set and then doesn’t change, even if I change the value.

    Thanks!

    John
    Attached Files Attached Files
    Last edited by jds217; 04-09-2009 at 09:22 PM. Reason: Solved

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