Tricky VBA automation

P932S

New Member
Joined
Oct 13, 2011
Messages
4
Hi guys,

I am looking to automate a manual and tedious calculation.
I have a database of loans and deposits each and I want to net off the loan and deposit amounts provided the following conditions are met.

1. Loan and deposit are in the same currency
2. The interest rate of a loan and deposit are no more than 0.15% different.
3. Provided the above conditions are satisfied then compare their maturity
a) If loan and deposit mature within the next 30 days then net them off if they mature on exactly the same date
b) If loan and deposit mature between 1 month and 1 year then their maturity should be within 7 days for hetting to take place.
c) If loan and deposit mature after one year then they should have maturities within 30 days of each other to net them off.

It would require some looping as a loan will need to be checked against each deposit in the dataset until either the entire loan is netted off or all deposits have been compared.

Any help would be much appreciated.

Thanks,
PS
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
1) You'd have to compare the cell formatting (google "vba cell format currency" ... should bring up the right results. I don't know off-hand)
2) Divide one value by the other and ensure it's not greater than 1.15

Combine these two into an If Then ElseIf Then Else statement...

Unfortunately I don't understand finance terms so I can't help with the rest D:
 
Upvote 0

Forum statistics

Threads
1,214,996
Messages
6,122,636
Members
449,092
Latest member
bsb1122

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