VBA to revalue financial statement

Certified

Board Regular
Joined
Jan 24, 2012
Messages
189
Hi,

On one sheet (sheet 1) I have A financial statement separated by currency.

[TABLE="width: 500"]
<tbody>[TR]
[TD]Account[/TD]
[TD]EUR[/TD]
[TD]HKD[/TD]
[TD]PLN[/TD]
[TD]USD[/TD]
[/TR]
[TR]
[TD]0005 cash[/TD]
[TD]590[/TD]
[TD]2601[/TD]
[TD]62563[/TD]
[TD]2427024[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

on another sheet (Sheet 2) I have month end exchange rates.


[TABLE="width: 500"]
<tbody>[TR]
[TD]from[/TD]
[TD]to[/TD]
[TD]date[/TD]
[TD]fx rate[/TD]
[/TR]
[TR]
[TD]EUR[/TD]
[TD]USD[/TD]
[TD]06/30/2014[/TD]
[TD]1.36925[/TD]
[/TR]
[TR]
[TD]HKD[/TD]
[TD]USD[/TD]
[TD]06/30/2014[/TD]
[TD].12902
[/TD]
[/TR]
[TR]
[TD]PLN[/TD]
[TD]USD[/TD]
[TD]06/30/2014[/TD]
[TD].32816[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD]USd[/TD]
[TD]06/30/2014[/TD]
[TD]1.00[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

What I am tying to produce on a new balance sheet would look like this...

Account Amount
005 Cash 244,698
, which is 590 *1.36925, 2601 * .12902, 62563 * .32816 and 2427024 *1.00

FYI, I have close to 200 accounts.

I am new at VBA and I am stuck on how I should approach this task.

Any help is greatly appreciated.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Excel 2010
ABCDEFG
1AccountEURHKDPLNUSDSum
20005 cash807.8575335.5810220530.6740824270242448698
New Balance Sheet
Cell Formulas
RangeFormula
A2=Sheet1!A2
B2=INDEX(Sheet1!$B:$E,MATCH($A2,Sheet1!$A:$A,0),MATCH(B$1,Sheet1!$B$1:$E$1,0))*VLOOKUP(B$1,Sheet2!$A:$D,4,0)
C2=INDEX(Sheet1!$B:$E,MATCH($A2,Sheet1!$A:$A,0),MATCH(C$1,Sheet1!$B$1:$E$1,0))*VLOOKUP(C$1,Sheet2!$A:$D,4,0)
D2=INDEX(Sheet1!$B:$E,MATCH($A2,Sheet1!$A:$A,0),MATCH(D$1,Sheet1!$B$1:$E$1,0))*VLOOKUP(D$1,Sheet2!$A:$D,4,0)
E2=INDEX(Sheet1!$B:$E,MATCH($A2,Sheet1!$A:$A,0),MATCH(E$1,Sheet1!$B$1:$E$1,0))*VLOOKUP(E$1,Sheet2!$A:$D,4,0)
G2=SUM(B2:E2)



Excel 2010
ABCDE
1AccountEURHKDPLNUSD
20005 cash5902601625632427024
Sheet1



Excel 2010
ABCD
1fromtodatefx rate
2EURUSD6/30/20141.36925
3HKDUSD6/30/20140.12902
4PLNUSD6/30/20140.32816
5USDUSd6/30/20141
Sheet2
 
Upvote 0

Forum statistics

Threads
1,222,229
Messages
6,164,738
Members
451,911
Latest member
HMF009

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