Question: Very simple vba problem, not sure where it is going wrong, but:

```
Range("J21").Select
For tastetherainbow = 1 To 1000
    skittle = ActiveCell.Offset(0, 2).Value
    Selection.Interior.Color = skittle        
    ActiveCell.Offset(1, 0).Select    
Next

```

The cell containing each appropriate skittle value contains an RGB code in the form RGB(r,g,b) , exactly as it should be for the VBA. I have tested it by copy pasting the cell's value into Selection.Interior.Color = *paste* without issue, but I get a "type mismatch" when it just uses skittle.

In fact, the only reason I am using skittle as a variable is that I had the same issue when I used `Selection.Offset(0,2).Value` to set the colour. 

Rather lost! Could you let me know how to fix it, and *why* I have this issue. 

Thanks!

Answer: 
Thanks for all the help guys, I modified it and cheated a little... This is running as part of a *much* larger macro, so I decided to just make the array of R, G, and B values explicit, and do it this way. From reading online Victor it says that RGB() expects values as integers - Long is more efficient but does the same thing nowadays no? Here is a working version. Couldn't have done it without you both thank you very much!

```
 Sub ColourMeImpressed()

    Dim Skittler As Long
    Dim Skittleg As Long
    Dim Skittleb As Long

    Dim tastetherainbow As Long

    With Sheets("Converter")
        For tastetherainbow = 21 To 1000
            Skittler = .Cells(tastetherainbow, "G")
            Skittleg = .Cells(tastetherainbow, "H")
            Skittleb = .Cells(tastetherainbow, "I")
                Skittle = RGB(Skittler, Skittleg, Skittleb)
                .Cells(tastetherainbow, "J").Interior.Color = Skittle
        Next tastetherainbow
    End With

    End Sub

```

For those interested, here is a screenshot of the final result:

[![enter image description here](https://i.stack.imgur.com/qERaG.png)](https://i.stack.imgur.com/qERaG.png)
```
'little modification is required in your code as follows 
Range("J21").Select
For tastetherainbow = 1 To 1000
    skittle = ActiveCell.Offset(0, 2).Value
    Selection.Interior.Color = RGB(skittle)        
    ActiveCell.Offset(1, 0).Select    
Next

```