# color scales and donut charts

#### Weegie5

##### New Member
Here is an issue that has been bugging me for several months now. I have a table of data to which I applied conditional formatting color scales: the cell fill color transitions from blue to yellow to red as the values in the table go from lowest to highest.

The table has 36 columns in it and 10 rows. I want to plot the data in a donut chart with 36 "slices" in 10 concentric circles. (The top row of the table would be the center of the donut and the bottom row would be the outermost donut. 0 would be the top of the circle, 90 would be @ 3 o'clock, 180 at the bottom, and so on.)

All the slices need to be the same width, as shown, but ultimately I want the colors of the donut chart to match the color scale of the table. I'd also like to be able to view the values for each cell, even if that is in a separate view/version of the donut chart.

I'm currently stuck trying to determine the RGB color code of each of the cells in the table. I've read through the VB functions explained at http://www.cpearson.com/excel/colors.aspx and none of that appears to be what I need.

Any assistance at all would be greatly appreciated!

### Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
This will return the RGB color of the active cell

Code:
``````Sub ShowColour()
Dim RGBColour As String, R As Integer, G As Integer, B As Integer
RGBColour = Right("000000" & Hex(ActiveCell.Interior.Color), 6)
R = WorksheetFunction.Hex2Dec(Right(RGBColour, 2))
G = WorksheetFunction.Hex2Dec(Mid(RGBColour, 3, 2))
B = WorksheetFunction.Hex2Dec(Left(RGBColour, 2))
MsgBox "RGB" & vbTab & R & ", " & G & ", " & B & vbCrLf & _
"Color" & vbTab & ActiveCell.Interior.Color & vbCrLf & _
"Index" & vbTab & ActiveCell.Interior.ColorIndex, vbInformation
End Sub``````

VoG, thanks for the quick reply.

This will return the RGB color of the active cell
Unfortunately that returns the same values for any of the cells in the table. It says
Code:
``````RGB         255, 255, 255
Color       16777215
Index       -4142``````
regardless of the color. And the cells certainly aren't white.

I suspect this is because it is a color scale applied to the table and not more simple conditional formatting, but I'm hardly the expert here...

but I'm hardly the expert here...

Nor am I. Perhaps you need to look at the SchemeColor property.

Replies
4
Views
656
Replies
13
Views
3K
Replies
2
Views
288
Replies
2
Views
578
Replies
7
Views
157

1,212,056
Messages
6,105,648
Members
447,974
Latest member
misspancake

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back