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.

AccountEURHKDPLNUSD
0005 cash5902601625632427024

<tbody>
</tbody>

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


fromtodatefx rate
EURUSD06/30/20141.36925
HKDUSD06/30/2014.12902
PLNUSD06/30/2014.32816
USDUSd06/30/20141.00

<tbody>
</tbody>

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 total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

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,214,870
Messages
6,122,019
Members
449,060
Latest member
LinusJE

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