VBA macro to report bank transactions in summary sheet

msmna93

New Member
Joined
Dec 31, 2018
Messages
2
I am a VBA beginner and I need your help to solve a problem that I will explain in detail below.
Suppose I have a table like this in an Excel sheet called “Merged” contained in “Foglio1.xlsx” Workbook. This table was obtained by merging together four different bank statements of two different companies on a given day. In Column B I have the name of the company. In Column D I have the IBAN of the bank account. In Column L I have the Amount in Thousands of the transaction. In Column N I have my own - defined Category of the transaction. In Column P I have the value day of the transaction. See the following picture.

What I need to do is to find a VBA - programmatic way to do the following:
1) Compute the sum of the Amounts in Thousands by IBAN, Category and Value Day.
2) Copy and paste all the sums from point 1 to an Excel sheet called “Summary Report” contained in an Excel workbook called “Foglio2”. The Summary Report sheet looks like in the following picture. In Column B I have the IBAN of the account. In Column I I have the three criteria by which the transactions need to be summed. In Columns from J rightwards I need to have reported all the sums of the Amounts In Thousands by Value Day and by Category. To further complicate matters for me, the items from the fields Value Day and Category of the Summary Report sheet can be selected from a Data Validation drop-down menu.


 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hi Msmna,
could you please post the code you already created here? Even some pseudo-code is helpfull. Pseudo-code is basically chopping up your wannabe code into small programmable steps without the actual code.

What I would do in your case:
-make a tool that imports and aggregates your 4 statements into that one table you show in foglio1
-run a pivot table over that table of data. That is basically a standard pivot table, just needs refreshing after you've updated the data
-run a second bit of VBA to export the code to the foglio2 file.

Good first steps to start with:
-write some pseudo-code
-record the steps with the macro recording
-learn some more VBA on the way

Cheers,
Koen
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,264
Members
452,627
Latest member
KitkatToby

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