Option Explicit
Sub test()
Dim r As Range
Set r = Range("a1")
Range("b1").Interior.ColorIndex = colorBG(r)
Range("c1").Interior.ColorIndex = colorBG(r)
End Sub
Private Function colorBG(src As Range) As Integer
colorBG = src.Interior.ColorIndex
End Function