thanks,

but I don't quite understand it...
As far as I can see, colorBG() retrieves color code and returns it. And test() changes BG of fixed cells (not the ActiveCell) - and it's not even called from within colorBG().

Or am I missing something? :-$




Quote Originally Posted by mana View Post
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