Custom Colors

Some videos you may like

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Smitty

Legend
Joined
May 15, 2003
Messages
29,536
Is there a way to make custom colors in an Excel sheet?

Outside of the color palette?

Not really. But this code will list all available to you:

<font face=Tahoma><SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Sub</SPAN> GetColors()
    <SPAN style="color:#00007F">Dim</SPAN> x <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Integer</SPAN>
    
    Application.ScreenUpdating = <SPAN style="color:#00007F">False</SPAN>
        <SPAN style="color:#00007F">For</SPAN> x = 1 <SPAN style="color:#00007F">To</SPAN> 56
            Cells(x, 1) = x
            Cells(x, 2).Interior.ColorIndex = x
        <SPAN style="color:#00007F">Next</SPAN> x
    Application.ScreenUpdating = <SPAN style="color:#00007F">True</SPAN>

<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>

HTH,

Smitty

EDIT: Note that I think that's Erik's code. :)
 

erik.van.geit

MrExcel MVP
Joined
Feb 1, 2003
Messages
17,832
Hi,

see what you can do with menu TOOLS/options: tab "color"
(I've never used it: prefer to stick to the default colors)

kind regards,
Erik
 

ironsides

Well-known Member
Joined
Aug 12, 2002
Messages
575
Hi,

see what you can do with menu TOOLS/options: tab "color"
(I've never used it: prefer to stick to the default colors)

kind regards,
Erik

Thanks Erik. Its not 100% custom but it's better than the standard pallet that's offered. Thanks, Matt
 

erik.van.geit

MrExcel MVP
Joined
Feb 1, 2003
Messages
17,832

ADVERTISEMENT

you're welcome :)
what are you trying to do ?
 

ironsides

Well-known Member
Joined
Aug 12, 2002
Messages
575
you're welcome :)
what are you trying to do ?[/quote

I have a sheet with about 75 cols so keeping track of which data corresponds to others sometime get me dizzy. Color coding corresponding cols, which most times are not contiguous, but are related, makes it easier, and saves me from having to concentrate so intently, also cuts my errors. ...and it's pleasing to look at. When my wife looks over my shoulder she's impressed (what ever it takes I guess). Thanks for asking, Matt
 

erik.van.geit

MrExcel MVP
Joined
Feb 1, 2003
Messages
17,832
I asked because the answer could have provided more ideas to solve the problem another way...
 

Watch MrExcel Video

Forum statistics

Threads
1,114,407
Messages
5,547,771
Members
410,811
Latest member
adustin42
Top