+ Reply to Thread
Results 1 to 6 of 6

Conditional format, expand choices

  1. #1
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Conditional format, expand choices

    Hey, I am trying make one cell have 10 background color choices instead of the standard 3. Eg, when the number "2" is entered in the cell it will turn red, when "4" is entered it will turn green, when "6" is entered it will turn blue, this will continue until the number "20" going up by 2's making 10 color choices for one cell.

    This book will be used on a PC that is using Excel 2003. And all the research I have done says it can only be done by a macro. Any help would be much appreciated.
    Last edited by JapanDave; 05-31-2011 at 04:41 AM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Conditional format, expand choices

    Your research shows the correct result. This forum has many examples for more than 3 conditional formats with VBA.

    Search just Excelforum using Google

    more than three conditional format site:excelforum.com

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Conditional format, expand choices

    Hello JapanDave,

    Here are two macro that you can added to the workbook. One is a Worksheet_Change() event and the other handles the color matrix. You may need to make change to the color matrix to match what you want.

    Worksheet_Change() Macro
    Please Login or Register  to view this content.

    Module1 - Macro to Load the Color Matrix
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Conditional format, expand choices

    Hi Leith,
    That is what I was after, many thanks. (You have rep points)

    One question though, if I wanted to change the rule to sequential numbers, eg 1=red, 2=green, 3=Blue ect, ect what do I have to change?

    TIA

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Conditional format, expand choices

    Hello JapanDave,

    Sorry about the late response. I had a project to complete before going to bed. To answer your question, you need only change the Worksheet_Change event code. Here is the code for sequential numbers. This will respond to values from 1 to 10

    Worksheet_Change() Macro
    Please Login or Register  to view this content.

  6. #6
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Conditional format, expand choices

    Thanks , that did the trick!

+ 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