You are on page 1of 18

Sub ok()

Dim rg As Range

Dim rgg As Range

Dim rggg As Range

Dim rgggg As Range

Dim rggggg As Range

Dim rgggggg As Range

Dim rn1 As Range

Dim rv2 As Range

Dim rn3 As Range

Dim rn4 As Range

Dim rn5 As Range

Dim rn6 As Range

Dim rn7 As Range

Dim rn8 As Range

Dim rn9 As Range

Dim rv1 As Range

Dim rn2 As Range

Dim rv3 As Range

Dim rv4 As Range

Dim rv5 As Range

Set rg = Range("C10:C15")

Set rgg = Range("E13:E15")

Set rggg = Range("F11:F15")


Set rgggg = Range("G15")

Set rggggg = Range("H14:H15")

Set rgggggg = Range("I14:I15")

Set rn1 = Range("D9:D12")

Set rv2 = Range("D14:D15")

Set rn3 = Range("E9:E10")

Set rn4 = Range("E12")

Set rn5 = Range("F9:F10")

Set rn6 = Range("G11:G14")

Set rn7 = Range("H10:H13")

Set rn8 = Range("I9:I10")

Set rn9 = Range("I12")

Set rv1 = Range("C9")

Set rn2 = Range("D13")

Set rv3 = Range("G9:G10")

Set rv4 = Range("H9")

Set rv5 = Range("I13")

If (rg.Font.ColorIndex = 1) Then

rg.Font.ColorIndex = 3

ElseIf (rg.Font.ColorIndex = 3) Then

rg.Font.ColorIndex = 1

End If
If (rn1.Font.ColorIndex = 1) Then

rn1.Font.ColorIndex = 44

End If

If (rv2.Font.ColorIndex = 1) Then

rv2.Font.ColorIndex = 44

End If

If (rn3.Font.ColorIndex = 1) Then

rn3.Font.ColorIndex = 44

End If

If (rn4.Font.ColorIndex = 1) Then

rn4.Font.ColorIndex = 44

End If

If (rn5.Font.ColorIndex = 1) Then

rn5.Font.ColorIndex = 44

End If

If (rn6.Font.ColorIndex = 1) Then

rn6.Font.ColorIndex = 44

End If

If (rn7.Font.ColorIndex = 1) Then

rn7.Font.ColorIndex = 44

End If

If (rn8.Font.ColorIndex = 1) Then

rn8.Font.ColorIndex = 44

End If

If (rn9.Font.ColorIndex = 1) Then
rn9.Font.ColorIndex = 44

End If

If (rv1.Font.ColorIndex = 1) Then

rv1.Font.ColorIndex = 27

End If

If (rn2.Font.ColorIndex = 1) Then

rn2.Font.ColorIndex = 27

End If

If (rv3.Font.ColorIndex = 1) Then

rv3.Font.ColorIndex = 27

End If

If (rv4.Font.ColorIndex = 1) Then

rv4.Font.ColorIndex = 27

End If

If (rv5.Font.ColorIndex = 1) Then

rv5.Font.ColorIndex = 27

End If

If (rgg.Font.ColorIndex = 1) Then

rgg.Font.ColorIndex = 3

ElseIf (rgg.Font.ColorIndex = 3) Then

rgg.Font.ColorIndex = 1

End If

If (rggg.Font.ColorIndex = 1) Then
rggg.Font.ColorIndex = 3

ElseIf (rggg.Font.ColorIndex = 3) Then

rggg.Font.ColorIndex = 1

End If

If (rgggg.Font.ColorIndex = 1) Then

rgggg.Font.ColorIndex = 3

ElseIf (rgggg.Font.ColorIndex = 3) Then

rgggg.Font.ColorIndex = 1

End If

If (rggggg.Font.ColorIndex = 3) Then

rggggg.Font.ColorIndex = 1

ElseIf (rggggg.Font.ColorIndex = 1) Then

rggggg.Font.ColorIndex = 3

End If

If (rgggggg.Font.ColorIndex = 3) Then

rgggggg.Font.ColorIndex = 1

ElseIf (rgggggg.Font.ColorIndex = 1) Then

rgggggg.Font.ColorIndex = 3

End If

End Sub
Sub okk()

Dim rn1 As Range

Dim rv2 As Range

Dim rn3 As Range

Dim rn4 As Range

Dim rn5 As Range

Dim rn6 As Range

Dim rn7 As Range

Dim rn8 As Range

Dim rn9 As Range

Dim rg As Range

Dim rgg As Range

Dim rggg As Range

Dim rgggg As Range

Dim rggggg As Range

Dim rgggggg As Range

Dim rv1 As Range

Dim rn2 As Range

Dim rv3 As Range

Dim rv4 As Range

Dim rv5 As Range


Set rn1 = Range("D9:D12")

Set rv2 = Range("D14:D15")

Set rn3 = Range("E9:E10")

Set rn4 = Range("E12")

Set rn5 = Range("F9:F10")

Set rn6 = Range("G11:G14")

Set rn7 = Range("H10:H13")

Set rn8 = Range("I9:I10")

Set rn9 = Range("I12")

Set rg = Range("C10:C15")

Set rgg = Range("E13:E15")

Set rggg = Range("F11:F15")

Set rgggg = Range("G15")

Set rggggg = Range("H14:H15")

Set rgggggg = Range("I14:I15")

Set rv1 = Range("C9")

Set rn2 = Range("D13")

Set rv3 = Range("G9:G10")

Set rv4 = Range("H9")

Set rv5 = Range("I13")

If (rv1.Font.ColorIndex = 1) Then

rv1.Font.ColorIndex = 27

End If

If (rn2.Font.ColorIndex = 1) Then
rn2.Font.ColorIndex = 27

End If

If (rv3.Font.ColorIndex = 1) Then

rv3.Font.ColorIndex = 27

End If

If (rv4.Font.ColorIndex = 1) Then

rv4.Font.ColorIndex = 27

End If

If (rv5.Font.ColorIndex = 1) Then

rv5.Font.ColorIndex = 27

End If

If (rn1.Font.ColorIndex = 1) Then

rn1.Font.ColorIndex = 44

ElseIf (rn1.Font.ColorIndex = 44) Then

rn1.Font.ColorIndex = 1

End If

If (rg.Font.ColorIndex = 1) Then

rg.Font.ColorIndex = 3

End If

If (rgg.Font.ColorIndex = 1) Then

rgg.Font.ColorIndex = 3
End If

If (rggg.Font.ColorIndex = 1) Then

rggg.Font.ColorIndex = 3

End If

If (rgggg.Font.ColorIndex = 1) Then

rgggg.Font.ColorIndex = 3

End If

If (rggggg.Font.ColorIndex = 1) Then

rggggg.Font.ColorIndex = 3

End If

If (rgggggg.Font.ColorIndex = 1) Then

rgggggg.Font.ColorIndex = 3

End If

If (rv2.Font.ColorIndex = 1) Then

rv2.Font.ColorIndex = 44

ElseIf (rv2.Font.ColorIndex = 44) Then

rv2.Font.ColorIndex = 1

End If
If (rn3.Font.ColorIndex = 1) Then

rn3.Font.ColorIndex = 44

ElseIf (rn3.Font.ColorIndex = 44) Then

rn3.Font.ColorIndex = 1

End If

If (rn4.Font.ColorIndex = 1) Then

rn4.Font.ColorIndex = 44

ElseIf (rn4.Font.ColorIndex = 44) Then

rn4.Font.ColorIndex = 1

End If

If (rn5.Font.ColorIndex = 44) Then

rn5.Font.ColorIndex = 1

ElseIf (rn5.Font.ColorIndex = 1) Then

rn5.Font.ColorIndex = 44

End If

If (rn6.Font.ColorIndex = 44) Then

rn6.Font.ColorIndex = 1

ElseIf (rn6.Font.ColorIndex = 1) Then


rn6.Font.ColorIndex = 44

End If

If (rn7.Font.ColorIndex = 44) Then

rn7.Font.ColorIndex = 1

ElseIf (rn7.Font.ColorIndex = 1) Then

rn7.Font.ColorIndex = 44

End If

If (rn8.Font.ColorIndex = 44) Then

rn8.Font.ColorIndex = 1

ElseIf (rn8.Font.ColorIndex = 1) Then

rn8.Font.ColorIndex = 44

End If

If (rn9.Font.ColorIndex = 44) Then

rn9.Font.ColorIndex = 1

ElseIf (rn9.Font.ColorIndex = 1) Then

rn9.Font.ColorIndex = 44

End If
End Sub

Sub okkk()

Dim rg As Range

Dim rgg As Range

Dim rggg As Range

Dim rgggg As Range

Dim rggggg As Range

Dim rgggggg As Range

Dim rn1 As Range

Dim rv2 As Range

Dim rn3 As Range

Dim rn4 As Range

Dim rn5 As Range

Dim rn6 As Range

Dim rn7 As Range

Dim rn8 As Range

Dim rn9 As Range

Dim rv1 As Range

Dim rn2 As Range

Dim rv3 As Range

Dim rv4 As Range

Dim rv5 As Range


Set rg = Range("C10:C15")

Set rgg = Range("E13:E15")

Set rggg = Range("F11:F15")

Set rgggg = Range("G15")

Set rggggg = Range("H14:H15")

Set rgggggg = Range("I14:I15")

Set rn1 = Range("D9:D12")

Set rv2 = Range("D14:D15")

Set rn3 = Range("E9:E10")

Set rn4 = Range("E12")

Set rn5 = Range("F9:F10")

Set rn6 = Range("G11:G14")

Set rn7 = Range("H10:H13")

Set rn8 = Range("I9:I10")

Set rn9 = Range("I12")

Set rv1 = Range("C9")

Set rn2 = Range("D13")

Set rv3 = Range("G9:G10")

Set rv4 = Range("H9")

Set rv5 = Range("I13")

If (rn1.Font.ColorIndex = 1) Then

rn1.Font.ColorIndex = 44

End If
If (rv2.Font.ColorIndex = 1) Then

rv2.Font.ColorIndex = 44

End If

If (rn3.Font.ColorIndex = 1) Then

rn3.Font.ColorIndex = 44

End If

If (rn4.Font.ColorIndex = 1) Then

rn4.Font.ColorIndex = 44

End If

If (rn5.Font.ColorIndex = 1) Then

rn5.Font.ColorIndex = 44

End If

If (rn6.Font.ColorIndex = 1) Then

rn6.Font.ColorIndex = 44

End If

If (rn7.Font.ColorIndex = 1) Then

rn7.Font.ColorIndex = 44

End If

If (rn8.Font.ColorIndex = 1) Then

rn8.Font.ColorIndex = 44

End If

If (rn9.Font.ColorIndex = 1) Then

rn9.Font.ColorIndex = 44

End If
If (rv1.Font.ColorIndex = 27) Then

rv1.Font.ColorIndex = 1

ElseIf (rv1.Font.ColorIndex = 1) Then

rv1.Font.ColorIndex = 27

End If

If (rn2.Font.ColorIndex = 1) Then

rn2.Font.ColorIndex = 27

ElseIf (rn2.Font.ColorIndex = 27) Then

rn2.Font.ColorIndex = 1

End If

If (rv3.Font.ColorIndex = 1) Then

rv3.Font.ColorIndex = 27

ElseIf (rv3.Font.ColorIndex = 27) Then

rv3.Font.ColorIndex = 1

End If

If (rv4.Font.ColorIndex = 1) Then
rv4.Font.ColorIndex = 27

ElseIf (rv4.Font.ColorIndex = 27) Then

rv4.Font.ColorIndex = 1

End If

If (rv5.Font.ColorIndex = 27) Then

rv5.Font.ColorIndex = 1

ElseIf (rv5.Font.ColorIndex = 1) Then

rv5.Font.ColorIndex = 27

End If

If (rg.Font.ColorIndex = 1) Then

rg.Font.ColorIndex = 3

End If

If (rgg.Font.ColorIndex = 1) Then

rgg.Font.ColorIndex = 3

End If

If (rggg.Font.ColorIndex = 1) Then

rggg.Font.ColorIndex = 3

End If

If (rgggg.Font.ColorIndex = 1) Then
rgggg.Font.ColorIndex = 3

End If

If (rggggg.Font.ColorIndex = 1) Then

rggggg.Font.ColorIndex = 3

End If

If (rgggggg.Font.ColorIndex = 1) Then

rgggggg.Font.ColorIndex = 3

End If

End Sub

Sub okkkk()

Dim rx1 As Range

Dim rx2 As Range

Set rx1 = Range("E11")

Set rx2 = Range("I11")

If (rx1.Font.ColorIndex = 33) Then

rx1.Font.ColorIndex = 1

ElseIf (rx1.Font.ColorIndex = 1) Then

rx1.Font.ColorIndex = 33

End If
If (rx2.Font.ColorIndex = 33) Then

rx2.Font.ColorIndex = 1

ElseIf (rx2.Font.ColorIndex = 1) Then

rx2.Font.ColorIndex = 33

End If

End Sub

You might also like