Pages

Wednesday, June 13, 2007

ColorIndex - Coloring Excel Sheet Cells

Highlight Color in Excel Cells

Colorindex is used to color the background of Excel Cells

Cells(1, 2).Interior.ColorIndex = 30

etc

Here is the entire list of colors you can use:






RSS Feeds Submission Directory

7 comments:

  1. Anonymous5:45 AM

    the ColorIndex property can be applied to other objects (eg Font, Border, Borders, FormatColor, Tab). right?

    ReplyDelete
  2. Anonymous12:38 AM

    Thanks but what is the code for blank (not white)?

    ReplyDelete
  3. Anonymous8:31 AM

    'pretty sure it's -4142
    Just try it or do like me: record a new macro in Excel, and change the color of a cell or character, stop the macro and look at the result with Alt-F11 in Modules

    ReplyDelete
  4. Anonymous2:05 PM

    blank (not white) equals -4142 (or xlColorIndexNone)

    ReplyDelete
  5. Anonymous5:05 AM

    you nutcase why would you need a code for no fill? time waster!!!!

    ReplyDelete
    Replies
    1. Anonymous2:02 AM

      If you have already colored a sheet or cell and you want to blank it. Nutcase...

      Delete