+ Reply to Thread
Results 1 to 2 of 2

Change Background Color Based On Cell

  1. #1
    Registered User
    Join Date
    04-25-2004
    Posts
    4

    Change Background Color Based On Cell

    Ok, here is the scenario. If there is a non-vb way of doing this, I am all ears. I am not the best at VB,but I am learning.

    Cell A1 through A40 I have text values of days of week, such as MON,TUE, SUN, etc. Some of these cells have a green color background (user adds the background color throughout the week.

    What I am looking to do is key off of =Today() and determine if the text matches the day of the week. If it does, it changes the background color of that specific cell such as A1 to a No Fill background.

    Here is what I have done so far.

    I have a new column that I determine if the Text value = the day of the week, such as MON, TUE, etc. If it matches I put a 1 value in a cell. What I would like to do is to change one of the cells A1-A40 automatically to a no fill (changing the color from a green background to a blank).

    I thought of conditional formatting, but here is the problem, the user through out the week will be highlighting cells A1-A40 with a green background. If you use conditional formatting, it will flip the color to a no fill if it matches, but the next day (when today is not equal to the text day) it changes it back to whatever the user used as a background color. So I would need to change it for good, until the user adds the green color back.

    Example:

    Todays Day = MON

    TUE
    WED
    SUN
    MON (Flip background color to a no fill)
    SAT
    MON ((Flip background color to a no fill)

    Thank you for your help.

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Change Background Color Based On Cell

    Conditional Formatting........... =weekday(A1,2)>1 ... set to green ... if the date in the cell is not a monday CF will shade it green. no manual shading will override it... Leave standard shading at no colour.
    Elegant Simplicity............. Not Always

+ Reply to Thread

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