Vba change event code

Paris0022

New Member
Joined
May 17, 2015
Messages
30
I am looking for help on setting up a VBA code for a CHANGE EVENT when a cell is entered and VBA kick in.

For Example I have B4 as “Initial Loan amount”, and D4 as “LTV %”. (Example pasted at the bottom of this message)

Purchase price is D1. For this example it’s $6,000,000.

Now going back to the two cells. If I enter 65% in the LTV cell D4, the Initial Loan cell B4 will state $3,900,000 (65% of $6,000,000). But if I change my mind and want to delete both cell, or just replace/overwrite the Initial Loan number for example to $2,100,000, then the LTV cell will automatically update/change to 35%. And if I wanted to go the LTV cell and change it to 60%, the Initial Loan cell will update to $3,600,000.

I am hoping you can help with a VBA code.

I will have 5 Loan rows.

Would like the CHANGE EVENT VBA to work for the following cell.
B4 with D4 (Loan 1)
B5 with D5 (Loan 2)
B6 with D6 (Loan 3)
B7 with D7 (Loan 4)
B8 with D8 (Loan 5)

Thanks,


Loan Amount 6,000,000
Initial LoanLTV
Loan 1 3,900,00065.0%
Loan 2
Loan 3
Loan 4
Loan 5
Total 3,900,00065.0%
Loan 1 =D4*D1 =B4/D1Looking for VBA Change Event code

<colgroup><col><col><col><col><col span="2"></colgroup><tbody>
</tbody>
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Forum statistics

Threads
1,214,979
Messages
6,122,551
Members
449,088
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top