Finding RGB color code for conditionally formatted cells (VBA)

mbk0523

New Member
Joined
Aug 29, 2012
Messages
23
Office Version
  1. 365
Platform
  1. Windows
Hi,

(Note: I am using Excel 2007).

I have a big range of cells on 'Sheet 1' that I have conditionally formatted. On 'Sheet 2' I have a table with the same column and row names as 'Sheet 1', but no data. In this table on 'Sheet 2' I want to put the RGB color (if possible in format RRR, GGG, BBB).

Hoping someone can help me with the VBA code to do this!

I found a lot of code already written on various websites, but they always returned the color index, and I need the RGB code. Or, in the case of this: Conditional Formatting Colors I keep getting a #VALUE! error whenever I try any of the code's formulas.

Thanks,
Matt
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Maybe this will get U started...
Code:
[sheet1!A1].Interior.Color = RGB(255, 0, 0) 'red
HTH. Dave
 
Upvote 0
Hi Dave,
Thanks for your response, but I'm not sure we're on the same page here...
I have conditionally formatted a range of cells with the "color scales" format, and I want to know the RGB code of each cell.
Does that make sense?

Thanks
 
Upvote 0

Forum statistics

Threads
1,214,402
Messages
6,119,299
Members
448,885
Latest member
LokiSonic

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top