title: Changing cell color to RGB values within Excel spreadsheet using VBA
body: <p>I've essentially got 10 sets of RGB values in 30 columns (each value in their own cell) with repeated different RGB values in 8 rows below these.  What I would like to do is color the cell of 10 cells to the right of these 30 to show a visual representation of the 10 colors (based on their set of RGB values) in all 8 of these rows.  I've seen a few VBA examples out in the wild that sort of do something similar but more just on a individual set of RGB values.  I was thinking I could create function like the following but that doesn't seem to work.  Maybe a Sub routine would be required to do this but not sure where to start.  Any help or direction would be appreciated. </p>
  
  <pre><code>Function RGB_Color(R As Integer, B As Integer, G As Integer)
  
      RGB_Color = Application.ThisCell.Interior.Color = RGB(R, G, B)
  
  End Function
  </code></pre>