Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ColorIndex returns incorrect color
Hi all
Trying to set interrior colorindex to 80% grey which I belive is #56 Yet the cell appears filled black to me and definitely changes when I copy format from one cell to the left Also is there a way to expand the color utility below to list what the color palette represents For example for value 56 col C should read "Grey 80%" Thanks -goss Snippet: With wsData For j = i To 2 Step -1 If InStr(.Cells(j, 18), "/Tax") Then .Cells(j, 18).EntireRow.Delete End If Next Set rngHead = .Range("R1") With rngHead .Value = "Switch" .Interior.Color = 56 .Font.Bold = True .Font.ColorIndex = 2 End With End With Color Index Utilities Sub ListColorIndexes() Dim wbBook As Workbook Dim wsColorList As Worksheet Dim Ndx As Long Set wbBook = ThisWorkbook Set wsColorList = wbBook.Worksheets("ColorList") wsColorList.UsedRange.Clear With wsColorList For Ndx = 1 To 56 .Cells(Ndx, 1).Interior.ColorIndex = Ndx .Cells(Ndx, 2).Formula = clr(.Cells(Ndx, 1)) Next Ndx End With End Sub Function clr(R As Range) As Integer With R.Interior clr = .ColorIndex End With End Function |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
SeriesCollection - Incorrect ColorIndex Assigned to Chart | Charts and Charting in Excel | |||
Pmt formula returns incorrect answer | Excel Discussion (Misc queries) | |||
DCount returns incorrect Result | Excel Worksheet Functions | |||
Like with * returns incorrect sheet name | Excel Programming | |||
sumif formula returns incorrect value | Excel Worksheet Functions |