Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default want to change cell background using RGB data in a worksheet

I want to set up a worksheet with 1 column the colour name and have the
background of that cell be the colour. I also have a column for the Hex #
associated with that colour for the web. Also included are 3 more columns
each with the corrisponding RGB #'s (ie Column C = R, Column D = G, Column E
= B). Is there a formula that can take the data from each cell columns C,D,E
to create the fill colour for each corrisponding cell in column A?
(ie A3 = Dark Red, Columns CDE3 contain the RGB code for Dark Red, then A4 =
Crimson and CDE4 the RGB code for crimson).
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default want to change cell background using RGB data in a worksheet

Any particular reason why you want to split the RGB into three columns rather
than have it grouped into one column as the RGB(255, 255, 255) function
format which would allow for ready application without having to manipulate
cell values?

"Jafo1968" wrote:

I want to set up a worksheet with 1 column the colour name and have the
background of that cell be the colour. I also have a column for the Hex #
associated with that colour for the web. Also included are 3 more columns
each with the corrisponding RGB #'s (ie Column C = R, Column D = G, Column E
= B). Is there a formula that can take the data from each cell columns C,D,E
to create the fill colour for each corrisponding cell in column A?
(ie A3 = Dark Red, Columns CDE3 contain the RGB code for Dark Red, then A4 =
Crimson and CDE4 the RGB code for crimson).

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default want to change cell background using RGB data in a worksheet

This site might be usefull to you.

http://www.mvps.org/dmcritchie/excel/colors.htm

"Jafo1968" wrote:

I want to set up a worksheet with 1 column the colour name and have the
background of that cell be the colour. I also have a column for the Hex #
associated with that colour for the web. Also included are 3 more columns
each with the corrisponding RGB #'s (ie Column C = R, Column D = G, Column E
= B). Is there a formula that can take the data from each cell columns C,D,E
to create the fill colour for each corrisponding cell in column A?
(ie A3 = Dark Red, Columns CDE3 contain the RGB code for Dark Red, then A4 =
Crimson and CDE4 the RGB code for crimson).

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default want to change cell background using RGB data in a worksheet

hi
formulas return values, they cannot perform actions like set formats.
See this site.
http://www.mvps.org/dmcritchie/excel/colors.htm
down aways on the page is a table with the 56 xl colors plus the HTML, hex
and RGB codes. you can copy and paste it into an xl sheet like i did.

Regards
FSt1

"Jafo1968" wrote:

I want to set up a worksheet with 1 column the colour name and have the
background of that cell be the colour. I also have a column for the Hex #
associated with that colour for the web. Also included are 3 more columns
each with the corrisponding RGB #'s (ie Column C = R, Column D = G, Column E
= B). Is there a formula that can take the data from each cell columns C,D,E
to create the fill colour for each corrisponding cell in column A?
(ie A3 = Dark Red, Columns CDE3 contain the RGB code for Dark Red, then A4 =
Crimson and CDE4 the RGB code for crimson).

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default want to change cell background using RGB data in a worksheet

hi
forgot to mention. only the first 8 colors have official names. all the rest
just have color index numbers.

regards
FSt1

"FSt1" wrote:

hi
formulas return values, they cannot perform actions like set formats.
See this site.
http://www.mvps.org/dmcritchie/excel/colors.htm
down aways on the page is a table with the 56 xl colors plus the HTML, hex
and RGB codes. you can copy and paste it into an xl sheet like i did.

Regards
FSt1

"Jafo1968" wrote:

I want to set up a worksheet with 1 column the colour name and have the
background of that cell be the colour. I also have a column for the Hex #
associated with that colour for the web. Also included are 3 more columns
each with the corrisponding RGB #'s (ie Column C = R, Column D = G, Column E
= B). Is there a formula that can take the data from each cell columns C,D,E
to create the fill colour for each corrisponding cell in column A?
(ie A3 = Dark Red, Columns CDE3 contain the RGB code for Dark Red, then A4 =
Crimson and CDE4 the RGB code for crimson).



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default want to change cell background using RGB data in a worksheet

If you are asking for colours in cells to be updated by cell formulas, and
you don't want to customize the palette, which you can't for two reasons
(later), you are asking for two impossible things in one short question.
That's quite unusual !

First problem is a UDF cannot change the interface, which means it can't
apply colours. Problem regarding the palette relates in part to the first
problem, the UDF cannot customize palette colours, and even if it could, the
palette only contains 56 colours (which is limiting for getting a good
choice of colours for use in a web page).

However, on the basis that nothing is impossible, I have a little demo
workbook that overcomes both those impossibilities. The example allows for
three cells to be changed, which in turn are linked to formulas that make a
few thousand unique RGB colour values, and in turn will fill cells with
those unique colours. Contact me off-line if interested to see the demo.

When I started to read you question I thought it was going ask what cell
formulas would be required to convert web-hex RRGGBB into individual RGB
values, and perhaps then into a VB colour value. However I see you already
have the RGB's, though FWIW they can indeed be converted with cell formulas.

Regards,
Peter T

"Jafo1968" wrote in message
...
I want to set up a worksheet with 1 column the colour name and have the
background of that cell be the colour. I also have a column for the Hex #
associated with that colour for the web. Also included are 3 more columns
each with the corrisponding RGB #'s (ie Column C = R, Column D = G, Column
E
= B). Is there a formula that can take the data from each cell columns
C,D,E
to create the fill colour for each corrisponding cell in column A?
(ie A3 = Dark Red, Columns CDE3 contain the RGB code for Dark Red, then A4
=
Crimson and CDE4 the RGB code for crimson).




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I change worksheet background colour Mark Setting up and Configuration of Excel 2 January 5th 21 07:17 AM
Change background / color of chart worksheet? Maj_USA_Ret Charts and Charting in Excel 3 March 12th 10 04:05 PM
change background row color with change of date in a cell Urszula Excel Discussion (Misc queries) 5 May 17th 06 07:56 AM
How do I change worksheet background? Dawnvt Excel Discussion (Misc queries) 7 May 8th 06 10:01 PM
can't change cell background? Todd[_5_] Excel Programming 0 September 2nd 03 04:41 PM


All times are GMT +1. The time now is 11:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"