Maybe something like this

[vba]

Public Sub Test()
Call TestRange(Range("A1:C1"), Range("M1:O1"), 3, 5, 0)

Call TestRange(Range("X1:Z1"), Range("M2:O2"), 3, 5, 0)

'etc.
End Sub

Private Function TestRange(rng1 As Range, rng2 As Range, CI1 As Long, CI2 As Long, CI3 As Long)

If rng1.Cells(1, 1).Value2 = "x" And rng1.Cells(1, 2).Value2 = "x" Then
rng2.Interior.ColorIndex = CI1
ElseIf rng1.Cells(1, 3).Value2 = "x" Then
rng2.Interior.ColorIndex = CI2
Else
rng2.Interior.ColorIndex = CI3
End If

End Function[/vba]