Not Correct -Range("A1:A6").Interior.Color =RGB(85

keeva

New Member
Joined
Jan 21, 2005
Messages
2
I've used this in a Macro in order to create a custom background color on some cells. The article is here http://www.mrexcel.com/td0070.html

Range("A1:A6").Interior.Color = RGB(85,116,185)

The problem is Excel creates RGB(102,102,153) - which is a default Excel color - instead of the true RGB(85,116,185) color.

Anyone know how to create custom cell background colors? The above macro VBA doesn't seem to create a truely custom color.

thanks,

- Kevin
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Re: Not Correct -Range("A1:A6").Interior.Color =RG

Which color from the fill dropdown do you get? I don't get any of them, and none of them look the same as RGB(85,116,185).
 
Upvote 0
Re: Not Correct -Range("A1:A6").Interior.Color =RG

in Tools >> Options >> Color.

Those are the colors you can use in the window. you can change these, by clicking the modify button after selecting a color to change. if you aren't plannning on having graphs, i recommend changing the two bottom rows of colors. you can also change the available colors from VB. record a macro of the above process to see how.
 
Upvote 0
Re: Not Correct -Range("A1:A6").Interior.Color =RG

Thank you halleyf!!

You had the very easy solution : )

- Kevin
 
Upvote 0

Forum statistics

Threads
1,214,935
Messages
6,122,337
Members
449,078
Latest member
skydd

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