If Range("C3") = "" And Range("C4") = "" Then
Range("C3") = ActiveCell.Column + 1
Range("C4") = ActiveCell.Row + 1
Else
If ActiveCell.Column = 1 And ActiveCell.Row = 1 Then
Range("C3") = Range("C3") - 1
Range("C4") = Range("C4") - 1
Else
End If
End If
If ActiveCell.Column > 1 And ActiveCell.Row > 1 And ActiveCell.Column < Range("C3") Then
ActiveCell.Offset(0, -1).Select
ActiveCell.Interior.ColorIndex = ActiveCell.Column
Else
If ActiveCell.Row > 1 And ActiveCell.Column < Range("C3") Then
ActiveCell.Offset(-1, 0).Select
ActiveCell.Interior.ColorIndex = ActiveCell.Row
Else
If ActiveCell.Column < Range("C3").Value Then
ActiveCell.Offset(0, 1).Select
ActiveCell.Interior.ColorIndex = ActiveCell.Column
Else
ActiveCell.Offset(1, 0).Select
ActiveCell.Interior.ColorIndex = ActiveCell.Row
End If
End If
End If