VBA to choose cells to add and multiply then paste results into new row

ThePangloss

New Member
Joined
Jun 19, 2015
Messages
40
Hey so I'm trying to make something in VBA that would make you input current payment and additional monthly, as well as select a range of a column that consists of FX rates. Then enter in the current month and calculate the information up to then and post it in this kind of format. It's going to be used for the future so I imagine the next time it's updated would be Jul 16 so the person would just find the FX rates and put them in the sheet and have it be able to select all the new rates.
At the end it should take all the values it's calculated and paste them into the rows below, so do the same for every row and I imagine I could do just the formula for one row and then have it do Next.

It looks something like this:


MonthPaid AmountTheoreticalUS/Uk ConversionAdditional MonthlyRecievedShortfallCumulative Variance
Oct-144421.258669.76
1.606801216.528320.59349.17
-1612.30
Nov-14
4421.258669.761.576951216.528188.62481.14-1131.17
Dec-144421.258669.761.563151216.528128.60542.16-589.00
Jan-154421.258669.761.515681216.527917.72752.04163.04
Feb-154421.258669.761.532741216.527993.15676.61839.65

<tbody>
</tbody>


Recieved is Paid*FX for that month + additional monthly
Shortfall is Theoretical - (Paid*FX for that month) - Additional Monthly
Cumulative variance is just the shortfalls added to each other from the previous shortfall.
I'm not exactly sure how to do this but I would guess it involves using Dim for 7 variables. Three of them would be as long, which are the additional monthly, theoertical and the actual payment. One as range which would be the set of the current FX rates up to whatever the current date is. Recived, Shortfall, and Cumulative shortfall would be as variable. I don't know how to put input boxes to enter information so I'm quite stumped on that part.

I'd prefer to do this than use formulas because there are multiple sheets like this, and it gets really annoying after a while. Some sheets are organized differently, or have extra columns with more payments and more FX changes, so if I have a general code for this I feel like modifying it would make this a lot easier.


Any help would be appreciated! Thanks
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Forum statistics

Threads
1,214,651
Messages
6,120,742
Members
448,989
Latest member
mariah3

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