Code to Customize Bank statement

RAJESH1960

Banned for repeated rules violations
Joined
Mar 26, 2020
Messages
2,313
Office Version
  1. 2019
Platform
  1. Windows
Hello Experts

I have this code which customizes bank statement as I want it to be. This code works for one particular bank only. AS there are N number of banks and the format and heading of each bank is different, I am not able to edit the code accordingly. AS the code was shared without comments, I don’t have any idea what some of the lines in the code actually do. The code in the VBA editor window works for the bank hidden in the workbook only. There is another code which is to be included in this bank code which combines text of multiple rows at each change in date. I need your expertise to edit both the codes wherever required and get the result as shown in the expected result sheet. I request you to please add a comment at line of code so that I can create multiple apps depending on each bank.
The sheet Bank is the original form as and when the data is received. I need the code for this sheet and get the result as in sheet Expected Result.
P.S: The code in the visual basic is only for reference purpose as it will help to solve more than 50% of the work. To test the code Bank Clean Data in the workbook you have to unhide the bank and name it as Bank.Customize New Bank.xlsm
 
Well if it was my code, I would have used more descriptive variable names to make it easier to understand/learn.

That being said:
ar is the array of data loaded from 'Bank' sheet
arr is the array of data that is being created to write to the New sheet
n is a row number, in this case it is set to one less than 'i' ... in other words 'i' would be the current row & 'n' would be the previous row.
 
Upvote 0

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
That is exactly why I was wishing for your own code.
 
Upvote 0
I am far from the wisest/best coder. A lot of excellent coders are here and a lot of them have their own style of coding.

Take what you are offered and try to learn from what you get. If you decide you would like to rename a variable used to make it easier to understand for you, by all means help yourself. Just make sure you rename each one in all spots of the code. I typically use the find option, start at the top of the code and click next to find each occurence to rename.
 
Upvote 0
I didn't mean any offence to any one. No doubt everybody has his own style and each one is an expert in their own way. Since, your comments help me to understand better and help me to edit and create new ones, I said so.
 
Upvote 0
Phew!! Finally. At least the code ran without error. All the column headings and data is haywire.. By tomorrow I will get them right too.
correct.png
 
Upvote 0
I am getting somewhere now. Except for the "Voucher type" and "Check" columns I got everything right.
semifinal.png
 
Upvote 0
Don't you need a 'Balance' or 'Closing Balance' header?
 
Upvote 0
What is funny about it.? I told you earlier about the Narration in multiple rows of each transaction. That I will have to add it somewhere in the code but where in the code, you will have to tell me or I will figure it out some way🤣🤣.
 
Upvote 0

Forum statistics

Threads
1,215,914
Messages
6,127,690
Members
449,398
Latest member
m_a_advisoryforall

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