+ Reply to Thread
Results 1 to 4 of 4

Question about automated colorchanging

  1. #1
    Registered User
    Join Date
    12-15-2011
    Location
    Peutie, Belgium
    MS-Off Ver
    Excel 2003
    Posts
    5

    Question about automated colorchanging

    Question concerning automated colorchanging
    Hi!

    I've been working a bit on a new Excelsheet to get an overall view of the situation of my vehicles.

    On my X-axis(row 1) I have the dates of januari 2012, entered using Format Cells / Date / (14-Mar).
    On my Y-axis(column A) I have the names/numbers of my vehicles in text format.

    Depending on the situation of the vehicle on a current date we use a certain color.

    E.g.

    Our Mercedes is gone for maintenance on the 2nd of February. The cell gets a red color.
    The next day it's free. the cell gets no color.
    The 4th it's gone on a mission. The cell gets a Blue color.

    To get a clear view of the disponibility of my vehicles we manually color the name of the vehicles (in the A column) in the same color as the current date/activity combination.


    Example 1.JPG

    In this example we're on the 2nd of February.

    On the 3rd I have to change the color of the vehicle's name (in the A column) back to white. The 4th to blue. And so on, and so on for the rest of the year.

    I hope you're still following

    Doing this manually is quickly forgotten or sometimes takes to much effort for some.

    Is it possible to automatically change the fillcolor of the cells in the first column to the color of the cells under the current date? Using functions or scripting

    E.g. that when we get to the 4th of February my color in the cell A3 ("Mercedes") changes automatically to blue.

    Thx for your attention

  2. #2
    Forum Contributor wamp's Avatar
    Join Date
    11-10-2008
    Location
    Norway
    MS-Off Ver
    97, 2000 & 2003 (diff. workstations)
    Posts
    184

    Re: Question about automated colorchanging

    Try this:

    Please Login or Register  to view this content.
    Last edited by wamp; 12-20-2011 at 03:37 AM. Reason: faulty code

  3. #3
    Registered User
    Join Date
    12-15-2011
    Location
    Peutie, Belgium
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Question about automated colorchanging

    Hi Wamp,

    Thx for a quick answer.
    But ... it's not working. I see you store cCol but don't use it later. is there a reason?
    I guess I have to change the ranges too?

    Thx

  4. #4
    Forum Contributor wamp's Avatar
    Join Date
    11-10-2008
    Location
    Norway
    MS-Off Ver
    97, 2000 & 2003 (diff. workstations)
    Posts
    184

    Re: Question about automated colorchanging

    Sorry, I posted a faulty code.
    the correct would be:
    Please Login or Register  to view this content.
    also see attached example.

    carMacro.xls

    (then you could run that macro on 'workbook open' for example)
    _______________________________________________
    Remember:

    Read the rules!

    Use code tags! Place [CODE] before the first line of code and [/CODE] after the last line of code.

    Mark your post [SOLVED] if it has been answered satisfactorily.
    To do this, click EDIT in your original post, click GO ADVANCED and set the PREFIX. It helps everybody!

    If you are approve (or disapprove) of any members response to your problem, please click the star icon underneath their post and comment. It matters.

+ 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