A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Right-click the sheet tab.
Select 'View Code' from the context menu.
Copy the following code into the worksheet module:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Not Intersect(Range("C20"), Target) Is Nothing Then
Application.EnableEvents = False
If Range("C20").Value = "" Or Not IsNumeric(Range("C20").Value) Then
Range("J13").ClearContents
Else
Range("J13").Value = Range("C20").Value * 12
End If
Application.EnableEvents = True
End If
If Not Intersect(Range("J13"), Target) Is Nothing Then
Application.EnableEvents = False
If Range("J13").Value = "" Or Not IsNumeric(Range("J13").Value) Then
Range("C20").ClearContents
Else
Range("C20").Value = Range("J13").Value / 12
End If
Application.EnableEvents = True
End If
End Sub