Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Iv got a huge problem with setting RGB colors in excel for difrent cells take a look on my script: Sub ColorCellBasedOnCellValue() Application.ScreenUpdating = False Application.Calculation = xlCalculationManual Dim cell As Range For Each cell In Intersect(Selection, ActiveCell.EntireColumn, ActiveSheet.UsedRange) Select Case cell.Value Case Is = False cell.Interior.ColorIndex = 0 Case Else cell.Interior.color = RGB(CByte("&H" & Right$(cell.Value, 2)), CByte("&H" & Mid$(cell.Value, 3, 2)), CByte("&H" & Left$ (cell.Value, 2))) End Select Next cell Application.Calculation = xlCalculationAutomatic Application.ScreenUpdating = False End Sub It supose to change Hexadecimal code from a cell change it to RGB and than fill its background with that color. It works, except excel uses its 56 color palette and puts own closest colors. I was thinking to change that formula to create a separate palette for each one color or new palete for every 56 new colors than create new one until finish (thers 800 difrend codes that i have to change). The problem is that i dont know how to do it. Can anybody help me with this?? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Setting dataseries-colors with VBA in XL2007 | Charts and Charting in Excel | |||
trouble setting colors | Charts and Charting in Excel | |||
Dynamically setting worksheet tab colors | Excel Worksheet Functions | |||
Setting colors of results in a column | Excel Discussion (Misc queries) | |||
Setting colors for Controls | Excel Programming |