My current code is:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 6 And Target.Row = 7 Then
If Target.Value = "Loan $" Then Target.Offset(2, 0).Formula = "=F14/F8": Target.Offset(2, 0).Interior.Color = RGB(217, 217, 217)
If Target.Value = "Loan to Cost" Then
Target.Offset(7, 0).Formula = "=F8*F9": Target.Offset(2, 0).Interior.Color = vbWhite
End If
End If
End Sub
But I need the VBA to also set the Offset(7, 0) to a numeric value, say $1,000,000, if the target value is "Loan $", and I need it to also set the Offset (2, 0) to a numeric value, say 65%, if the target value is "Loan to Cost".
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 6 And Target.Row = 7 Then
If Target.Value = "Loan $" Then Target.Offset(2, 0).Formula = "=F14/F8": Target.Offset(2, 0).Interior.Color = RGB(217, 217, 217)
If Target.Value = "Loan to Cost" Then
Target.Offset(7, 0).Formula = "=F8*F9": Target.Offset(2, 0).Interior.Color = vbWhite
End If
End If
End Sub
But I need the VBA to also set the Offset(7, 0) to a numeric value, say $1,000,000, if the target value is "Loan $", and I need it to also set the Offset (2, 0) to a numeric value, say 65%, if the target value is "Loan to Cost".