Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Feb 2006
    Thanked 0 Times in 0 Posts

    How can I apply the codes to auto change file color in a excel worksheet? I have a field call "Target", and the valume is 100%. I also have 12 fields which are "Jan" to "Dec." I would like to have file color of those 12 fields to be changed based on the valume in those fields. For example, if the value in "Jan" is 90%, then the fill color of "Jan" will be Red. If the value in "Feb" is 80%, then the fill color of "Feb" will be Green.

    Thanks in advance.


  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts
    If you're using Excel 2003 or earlier:

    If you want to apply at most 3 different colors depending on the value (apart from the default formatting), you can use Format | Conditional Formatting - see for example Excel Conditional Formatting Tutorial & Screencast.

    If you need more colors, you'd need to use VBA code in the Worksheet_Change event.

    If you're using Excel 2007 or later:

    Conditional formatting supports lots of different conditions. See for example Excel 2007 Tutorials - Conditional Formatting.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts