![]() |
changing the color of a cell
Hello! Gurus
Is there a way to change the color of a cell to some specific RGB combinations in addition to the standard color palette provided? It would be good if we can add this special color to the palette for future use. Thanks. zhj23 |
changing the color of a cell
ToolsOptionsColorModify will allow you change a color to any rgb value you'd
like. Or run a macro with your parameters. Sub foo() ActiveCell.Interior.Color = RGB(170, 112, 230) End Sub Gord Dibben MS Excel MVP On Fri, 30 Nov 2007 17:11:00 -0800, zhj23 wrote: Hello! Gurus Is there a way to change the color of a cell to some specific RGB combinations in addition to the standard color palette provided? It would be good if we can add this special color to the palette for future use. Thanks. zhj23 |
changing the color of a cell
Gord,
Please correct me if i'm wrong, but you can not set a cell color to a color that is not in XL's ColorIndex Color Pallette (pardon the terminology....please correct). I think I tried this once......tried to color a cell to an rgb value that did not have an index # and XL adjusted it to the nearest color that was assigned an index # (was using XL 2002 when I tried this, now using 2003...have not tried it). Is that correct? Thanks, Conan "Gord Dibben" <gorddibbATshawDOTca wrote in message ... ToolsOptionsColorModify will allow you change a color to any rgb value you'd like. Or run a macro with your parameters. Sub foo() ActiveCell.Interior.Color = RGB(170, 112, 230) End Sub Gord Dibben MS Excel MVP On Fri, 30 Nov 2007 17:11:00 -0800, zhj23 wrote: Hello! Gurus Is there a way to change the color of a cell to some specific RGB combinations in addition to the standard color palette provided? It would be good if we can add this special color to the palette for future use. Thanks. zhj23 |
changing the color of a cell
Gord:
Thanks for the reply. I prefer not to "modify", but "add" on to the color palette, so that I will not lose the standard colors. zhj23 "Gord Dibben" wrote: ToolsOptionsColorModify will allow you change a color to any rgb value you'd like. Or run a macro with your parameters. Sub foo() ActiveCell.Interior.Color = RGB(170, 112, 230) End Sub Gord Dibben MS Excel MVP On Fri, 30 Nov 2007 17:11:00 -0800, zhj23 wrote: Hello! Gurus Is there a way to change the color of a cell to some specific RGB combinations in addition to the standard color palette provided? It would be good if we can add this special color to the palette for future use. Thanks. zhj23 |
changing the color of a cell
hi,
you are corrected. xl does limit the total number of colors available to 56 but as Gord pointed out(tooloptionscolormodify buttoncostom OR standard tab) you can modify any of the standard 56 xl colors. and with 256 increments of the RGB, you have 256 x 256 x256 or 16,777,216 colors combinations available to you. Of course you can only display 56 of those colors at one time due to xl limitations but you can get real colorful if you want. sorry. FSt1 "Conan Kelly" wrote: Gord, Please correct me if i'm wrong, but you can not set a cell color to a color that is not in XL's ColorIndex Color Pallette (pardon the terminology....please correct). I think I tried this once......tried to color a cell to an rgb value that did not have an index # and XL adjusted it to the nearest color that was assigned an index # (was using XL 2002 when I tried this, now using 2003...have not tried it). Is that correct? Thanks, Conan "Gord Dibben" <gorddibbATshawDOTca wrote in message ... ToolsOptionsColorModify will allow you change a color to any rgb value you'd like. Or run a macro with your parameters. Sub foo() ActiveCell.Interior.Color = RGB(170, 112, 230) End Sub Gord Dibben MS Excel MVP On Fri, 30 Nov 2007 17:11:00 -0800, zhj23 wrote: Hello! Gurus Is there a way to change the color of a cell to some specific RGB combinations in addition to the standard color palette provided? It would be good if we can add this special color to the palette for future use. Thanks. zhj23 |
changing the color of a cell
As far as I know, you can't add, you can only replace. If you add a new
color it replaces one of the already existing colors. -- Biff Microsoft Excel MVP "zhj23" wrote in message ... Gord: Thanks for the reply. I prefer not to "modify", but "add" on to the color palette, so that I will not lose the standard colors. zhj23 "Gord Dibben" wrote: ToolsOptionsColorModify will allow you change a color to any rgb value you'd like. Or run a macro with your parameters. Sub foo() ActiveCell.Interior.Color = RGB(170, 112, 230) End Sub Gord Dibben MS Excel MVP On Fri, 30 Nov 2007 17:11:00 -0800, zhj23 wrote: Hello! Gurus Is there a way to change the color of a cell to some specific RGB combinations in addition to the standard color palette provided? It would be good if we can add this special color to the palette for future use. Thanks. zhj23 |
changing the color of a cell
FSt1, Gord, Chip Pearson, or anyone else who knows,
While we are on the subject of color, I took the following sub routine from Chip's website (http://www.cpearson.com/excel/colors.htm): Sub GetRGB(RGB As Long, ByRef Red As Integer, _ ByRef Green As Integer, ByRef Blue As Integer) Red = RGB And 255 Green = RGB \ 256 And 255 Blue = RGB \ 256 ^ 2 And 255 End Sub Now my question is, in the line that reads: Red = RGB And 255 mathematically, exactly what is going on here? I thought "And" was a logical operator. How can "RGB And 255" return anything other than TRUE/FALSE (or 1/0)? Thanks for the help, Conan "FSt1" wrote in message ... hi, you are corrected. xl does limit the total number of colors available to 56 but as Gord pointed out(tooloptionscolormodify buttoncostom OR standard tab) you can modify any of the standard 56 xl colors. and with 256 increments of the RGB, you have 256 x 256 x256 or 16,777,216 colors combinations available to you. Of course you can only display 56 of those colors at one time due to xl limitations but you can get real colorful if you want. sorry. FSt1 "Conan Kelly" wrote: Gord, Please correct me if i'm wrong, but you can not set a cell color to a color that is not in XL's ColorIndex Color Pallette (pardon the terminology....please correct). I think I tried this once......tried to color a cell to an rgb value that did not have an index # and XL adjusted it to the nearest color that was assigned an index # (was using XL 2002 when I tried this, now using 2003...have not tried it). Is that correct? Thanks, Conan "Gord Dibben" <gorddibbATshawDOTca wrote in message ... ToolsOptionsColorModify will allow you change a color to any rgb value you'd like. Or run a macro with your parameters. Sub foo() ActiveCell.Interior.Color = RGB(170, 112, 230) End Sub Gord Dibben MS Excel MVP On Fri, 30 Nov 2007 17:11:00 -0800, zhj23 wrote: Hello! Gurus Is there a way to change the color of a cell to some specific RGB combinations in addition to the standard color palette provided? It would be good if we can add this special color to the palette for future use. Thanks. zhj23 |
All times are GMT +1. The time now is 09:17 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com