Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Select Case Target.Address
Case "$A$5"
If [B5].Font.Color = &HFF Then
[C5].Value = 100 * [B5].Value / Target.Value
[B5].Font.Color = 0
Else
[B5].Value = Target.Value * [C5].Value / 100
[C5].Font.Color = 0
End If
Case "$B$5"
If [A5].Font.Color = &HFF Then
[C5].Value = 100 * Target.Value / [A5].Value
[A5].Font.Color = 0
Else
[A5].Value = 100 * Target.Value / [C5].Value
[C5].Font.Color = 0
End If
Case "$C$5"
If [B5].Font.Color = &HFF Then
[A5].Value = 100 * [B5].Value / Target.Value
[B5].Font.Color = 0
Else
[B5].Value = [A5].Value * Target.Value / 100
[A5].Font.Color = 0
End If
Case Else
Application.EnableEvents = True: Exit Sub
End Select
Application.EnableEvents = True
Target.Font.Color = &HFF
End Sub