Welcome to Office Zealot Sign in | Join | Help

Why are you so colorful?

People often ask me that... well not about me per se, but about my XL spreadsheets. So I decided to share one of my tips that often light up my colorful Excel demos...

If you are like me, you can't stand plain, unimaginative spreadsheets. Numbers need not be boring. But if you ever tried to customize the colors in Excel to match other sources such as a Web site or your company's logo, you probably noticed that Microsoft left out of Excel the all-important ability to 'lift' a color from another image...

And since I am typically imitating another source; a web page, image, logo, another document, where I want the colors to come from, I simply ‘borrow’ an image of the source and ‘get’ the colors from Microsoft Paint. Here are the steps I take:

  1. Print Screen the source to duplicate
  2. Paste the clipboard contents into Microsoft Paint
  3. Use the Color Picker tool to select the color you want to use
  4. From the Edit Colors dialog (Colors | Edit Colors…), click the Define Custom Colors… button to expand the dialog to revel the color settings

Click here to see what I am talking about...

Once you have the important RGB color settings from MS Paint, toggle over to Excel and create a routine similar to the following one where you apply your custom color’s RGB coordinates to alter the workbook’s Color properties. Note that your top-down RGB numbers from Paint go left-to-right in Excel:

Private Sub EditColor()
    ActiveWorkbook.Colors(17) = RGB(255, 204, 0)
    ActiveWorkbook.Colors(18) = RGB(255, 230, 130)
    ActiveWorkbook.Colors(19) = RGB(153, 204, 0)
    ActiveWorkbook.Colors(20) = RGB(236, 233, 216)
    ActiveWorkbook.Colors(21) = RGB(255, 0, 0)
    ActiveWorkbook.Colors(22) = RGB(0, 0, 153)
    ActiveWorkbook.Colors(23) = RGB(255, 255, 153)
    ActiveWorkbook.Colors(24) = RGB(71, 108, 145)
    ActiveWorkbook.Colors(25) = RGB(0, 128, 0)
    ActiveWorkbook.Colors(26) = RGB(255, 128, 0)
    ActiveWorkbook.Colors(27) = RGB(33, 139, 254)
    ActiveWorkbook.Colors(28) = RGB(217, 64, 64)
End Sub

Note you could use the following code to enter them 'by hand' with Excel's color dialog

Application.Dialogs(xlDialogColorPalette).Show

... But I find the little VBA allows me to target Colors 16-32 easier and I use those numbers even though they are 'reserved' for Chart fills and lines. I do it though because it is organizes easier than the others in Excel's palette which go in a rather unlogical order. This keeps them in one place.

Now using this, you can add your custom colors at the bottom of Excel’s color palette to and bring 'beauty' to your spreadsheet. Click here to see one of my Excel samples in living color...

Published Wednesday, November 26, 2003 10:25 AM by charles

Comments

No Comments

Anonymous comments are disabled