You can start with this sub. It will color a range of your desire (Rc) with data from (Rs).
Sub ColorRGB(Rs As Range, Rc As Range)
Dim R As Long
Dim G As Long
Dim B As Long
Dim Address(1 To 3) As Long
Dim I As Integer: I = 1
For Each cell In Rs.Cells
Address(I) = cell.Value
I = I + 1
Next
R = Address(1)
G = Address(2)
B = Address(3)
Rc.Interior.Color = RGB(R, G, B)
End Sub
Test:
In this test, we're coloring the cell D1 with the contents from the range A1:C1.
Sub Test()
ColorRGB Sheet1.Range("A1:C1"), Sheet1.Range("D1")
End Sub
Result:

The code below uses the RGBColor Sub. It will define a lastrow
long (8 in our case) so this can basically handle more rows. Then, it will take the first vertical range of 8 cells and set it in a Range object
called r
only to do a For Each
loop on it later.
With every cell in the For Each
loop, we're going to run with another For
loop transversely (in direction of columns). The new For
loop will run with step of 3 calling our ColorRGB function and telling it to take in the arguments supplied below.
Given the fact that the For
loop runs with a step of 3, we've defined a counter for the colored cells called c
that increments itself by 1 with each step of the For
loop (its step is egal to 3).
I hope this logic is clear. There are obviously better methods to do this.
Sub ColorSheet(sheetname As string)
Dim r As Range
'defining lastrow which is 8
Dim lastrow As Long
With ThisWorkbook.Worksheets(sheetname)
lastrow = .Cells(.Rows.Count, "A").End(xlUp).Row
Set r = .Range("A1", "A" & lastrow)
End With
Dim C As Integer: C = 30
For Each cell In r.Cells
For I = 1 To 30 Step 3
ColorRGB ThisWorkbook.Worksheets(sheetname).Range(cell.Offset(0, I - 1).Address(0, 0), cell.Offset(0, I + 1).Address(0, 0)), ThisWorkbook.Worksheets(sheetname).Range(cell.Offset(0, C).Address(0, 0))
C = C + 1
Next I
C = 30
Next
End Sub
This final sub will color the sheet name you provide it with.
Sub Test
ColorSheet("Sheet3")
'And so on...
End Sub
If your sheets are named like SheetX
Sub Test
Dim I as Integer
For I = 1 to 20
ColorSheet("Sheet"&I)
Next I
End Sub
Example:
