Here is the code I am trying. But it shows type mismatch error. I don't want to use for loop for setting colors to individual cell.
Function bgColor()
Dim MyArray(1, 3) As Variant
MyArray(0, 0) = 37
MyArray(0, 1) = 12
MyArray(0, 2) = 15
MyArray(0, 3) = 18
Sheets("Data").Range("A1:D1").Interior.ColorIndex = MyArray
End Function
