• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Applying RGB to Named Range

bkanne

Member
Can someone please help me write a macro that will also me to apply a particular R,G,B Color Scheme to individually named cell ranges?

Essentially, I am trying to create a heatmap using an applied color scheme. Please see the attached template for an example, which should make it quite clear what I am attempted to do.

Thank you so much!

BK
 

Attachments

  • Template_v2.xlsm
    16.1 KB · Views: 3
Code:
Sub Set_Colors()

Dim nm As Range

For Each nm In Range("BC21:BC35")
  Range(nm.Text).Interior.Color = RGB(nm.Offset(0, 2), nm.Offset(0, 3), nm.Offset(0, 4))
Next

End Sub

or see the attached file:
 

Attachments

  • Template_v2.xlsm
    24.7 KB · Views: 6
Last edited:
Back
Top