View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Fill color based on RGB

I'm aware of that and so I assumed was the OP who said different colour based
on the RGB values not unique based on those values

Mike
"Peter T" wrote:

ADK, how many unique colours do you envisage (envision) you will need in
total in the workbook.

Mike, the approach you suggested applies the 'nearest' RGB that already
exists in the palette. IOW one of the existing palette colours will be
applied, of which there are 46 in a default palette.

Regards,
Peter T

"ADK" wrote in message
...
A beginner at this vba stuff. Looking to color a cell based on RGB values

Column A has the R numbers
Column B has the G numbers
Column C has the B numbers
Column D will be the where the cells fill color is based on the values
entered in columns A thru C. I'll have 256 rows ...each row will end up
having a different fill color based on the values

Example

A1=255
B1=255
C1=0
D1={cell fill color would be yellow}

A2=255
B2=191
C2=0
D2={cell fill color would be orange}

Thanks in advance for your help!

ADK