Cell Formulas

  • Thread starter Thread starter BRustigian
  • Start date Start date
B

BRustigian

Hello, What formula will allow me to input a number % in (B 2) to find
$25,000 or input a number $25,000 in (C 2) to find 10% in (B 2) without
erasing the cell's formulas?


A B C
1 Sales Price: $250,000
2 Down Payment: 10% 25,000.
3 1st Mortgage 80% 200,000.
4 2nd Mortgage 10% 25,000.
 
A cell either contains either a value OR a formula, not both. You will have
to use VBA to accomplish what you want.

Right click on the sheet tab, and copy/paste code below. Assumes that Sale
Price will always be in cell(1,"C").

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo wsexit
Application.EnableEvents = False

If Target.Column = 2 Then
Cells(Target.Row, 3).Value = Cells(1, "C") * Target.Value
Else
If Target.Column = 3 Then
Cells(Target.Row, 2).Value = Target.Value / Cells(1, "C")
End If
End If
wsexit:
Application.EnableEvents = True
End Sub
 
Sorry, missing info ...

Right click on the sheet tab, VIEW CODE and copy/paste code below ....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top