Ammortization VBA

ferr

New Member
Joined
Jun 9, 2022
Messages
24
Office Version
  1. 365
Platform
  1. Windows
need to create a macro that essentially does the calculations in the 180 tables (60 tables in A1, 60 in A2 and 60 in A3) into a consolidated table like the one in sheet 7.
Sheet 7 is currently a bunch of queries that appends all the 180 tables into 1 table. I need a macro that does that, so there is no need for the 3 tabs (A1, A2, A3) and no more need for the queries.
Also, if the macro can exclude any data where the beginning balance is 0.






Schedule 2.xlsx
ABCDEFGH
1AsatdatPeriodSeller name idTotal Beg BalanceTotal InterestTotal PrepaymentsTotal End BalanceAssetCAtegory_broad
27/31/22 0:0017--0- CREM
38/31/22 0:0027--0- CREM
49/30/22 0:0037--0- CREM
510/31/22 0:0047--0- CREM
611/30/22 0:0057--0- CREM
712/31/22 0:0067--0- CREM
81/31/23 0:0077--0- CREM
92/28/23 0:0087--0- CREM
103/31/23 0:0097--0- CREM
114/30/23 0:00107--0- CREM
125/31/23 0:00117--0- CREM
136/30/23 0:00127--0- CREM
147/31/23 0:00137--0- CREM
158/31/23 0:00147500,000.001,756.400500,000.00 CREM
169/30/23 0:001571,000,000.005,128.1001,000,000.00 CREM
1710/31/23 0:001671,500,000.008,817.2501,500,000.00 CREM
1811/30/23 0:001772,000,000.0011,921.9002,000,000.00 CREM
1912/31/23 0:001872,500,000.0015,872.0302,500,000.00 CREM
201/31/24 0:001973,000,000.0019,460.3603,000,000.00 CREM
212/29/24 0:002073,500,000.0021,488.5403,500,000.00 CREM
223/31/24 0:002174,000,000.0026,267.9804,000,000.00 CREM
234/30/24 0:002274,500,000.0028,392.5704,500,000.00 CREM
245/31/24 0:002375,000,000.0032,276.5005,000,000.00 CREM
256/30/24 0:002475,500,000.0034,050.4805,500,000.00 CREM
267/31/24 0:002576,000,000.0038,044.4806,000,000.00 CREM
278/31/24 0:002676,500,000.0040,743.8606,500,000.00 CREM
289/30/24 0:002777,000,000.0041,814.1207,000,000.00 CREM
2910/31/24 0:002877,500,000.0045,438.7607,500,000.00 CREM
3011/30/24 0:002978,000,000.0045,971.7208,000,000.00 CREM
3112/31/24 0:003078,500,000.0049,472.2508,500,000.00 CREM
321/31/25 0:003179,000,000.0051,338.3209,000,000.00 CREM
332/28/25 0:003279,500,000.0048,019.5409,500,000.00 CREM
343/31/25 0:0033710,000,000.0054,913.91010,000,000.00 CREM
354/30/25 0:0034710,500,000.0054,831.21010,500,000.00 CREM
365/31/25 0:0035711,000,000.0058,608.52011,000,000.00 CREM
376/30/25 0:0036711,500,000.0058,875.82011,500,000.00 CREM
387/31/25 0:0037712,000,000.0063,060.45011,500,000.00 CREM
398/31/25 0:0038712,000,000.0062,136.28011,500,000.00 CREM
409/30/25 0:0039712,000,000.0058,618.29011,500,000.00 CREM
4110/31/25 0:0040712,000,000.0058,821.36011,500,000.00 CREM
4211/30/25 0:0041712,000,000.0055,706.95011,500,000.00 CREM
4312/31/25 0:0042712,000,000.0057,247.02011,500,000.00 CREM
441/31/26 0:0043712,000,000.0057,572.10011,500,000.00 CREM
452/28/26 0:0044712,000,000.0052,366.54011,500,000.00 CREM
463/31/26 0:0045712,000,000.0058,102.46011,500,000.00 CREM
474/30/26 0:0046712,000,000.0056,126.15011,500,000.00 CREM
485/31/26 0:0047712,000,000.0057,846.92011,500,000.00 CREM
496/30/26 0:0048712,000,000.0055,935.15011,500,000.00 CREM
507/31/26 0:0049712,000,000.0057,839.06011,500,000.00 CREM
518/31/26 0:0050712,000,000.0057,893.98011,500,000.00 CREM
529/30/26 0:0051712,000,000.0056,042.30011,500,000.00 CREM
5310/31/26 0:0052712,000,000.0057,895.86011,500,000.00 CREM
5411/30/26 0:0053711,500,000.0054,817.55011,000,000.00 CREM
5512/31/26 0:0054711,000,000.0054,176.40010,500,000.00 CREM
561/31/27 0:0055710,500,000.0051,718.60010,000,000.00 CREM
572/28/27 0:0056710,000,000.0044,494.4109,500,000.00 CREM
583/31/27 0:005779,500,000.0046,800.3109,000,000.00 CREM
594/30/27 0:005879,000,000.0042,905.5808,500,000.00 CREM
605/31/27 0:005978,500,000.0041,870.8108,000,000.00 CREM
616/30/27 0:006078,000,000.0038,136.0807,500,000.00 CREM
627/31/22 0:0016--0- CREM
638/31/22 0:0026--0- CREM
649/30/22 0:0036--0- CREM
6510/31/22 0:0046--0- CREM
6611/30/22 0:0056--0- CREM
6712/31/22 0:0066--0- CREM
681/31/23 0:0076--0- CREM
692/28/23 0:0086--0- CREM
703/31/23 0:0096--0- CREM
714/30/23 0:00106--0- CREM
725/31/23 0:00116--0- CREM
736/30/23 0:00126--0- CREM
747/31/23 0:00136--0- CREM
758/31/23 0:00146600,000.002,184.120600,000.00 CREM
769/30/23 0:001561,110,000.006,056.8601,110,000.00 CREM
7710/31/23 0:001662,110,000.0011,766.8402,110,000.00 CREM
7811/30/23 0:001762,710,000.0017,012.4102,710,000.00 CREM
7912/31/23 0:001863,310,000.0022,000.1703,310,000.00 CREM
801/31/24 0:001963,910,000.0026,465.9603,910,000.00 CREM
812/29/24 0:002064,510,000.0028,839.4104,510,000.00 CREM
823/31/24 0:002165,110,000.0034,918.6305,110,000.00 CREM
834/30/24 0:002265,710,000.0037,476.0405,710,000.00 CREM
845/31/24 0:002366,310,000.0042,369.5806,310,000.00 CREM
856/30/24 0:002466,910,000.0044,501.0306,910,000.00 CREM
867/31/24 0:002567,510,000.0049,541.5307,510,000.00 CREM
878/31/24 0:002668,110,000.0052,903.4808,110,000.00 CREM
889/30/24 0:002768,710,000.0054,170.9908,710,000.00 CREM
8910/31/24 0:002869,310,000.0058,765.1109,310,000.00 CREM
9011/30/24 0:002969,910,000.0059,374.5209,910,000.00 CREM
9112/31/24 0:0030610,510,000.0063,827.11010,510,000.00 CREM
921/31/25 0:0031611,110,000.0066,179.16011,110,000.00 CREM
932/28/25 0:0032611,710,000.0061,858.61011,710,000.00 CREM
943/31/25 0:0033612,310,000.0070,702.76012,310,000.00 CREM
954/30/25 0:0034612,910,000.0070,565.08012,910,000.00 CREM
965/31/25 0:0035613,510,000.0075,386.17013,510,000.00 CREM
976/30/25 0:0036614,110,000.0075,678.54014,110,000.00 CREM
987/31/25 0:0037614,710,000.0081,007.84014,710,000.00 CREM
998/31/25 0:0038615,310,000.0083,200.26015,310,000.00 CREM
1009/30/25 0:0039615,910,000.0081,724.06015,910,000.00 CREM
10110/31/25 0:0040616,510,000.0085,278.67016,510,000.00 CREM
10211/30/25 0:0041617,110,000.0083,841.43017,110,000.00 CREM
10312/31/25 0:0042617,710,000.0089,259.01017,710,000.00 CREM
1041/31/26 0:0043618,310,000.0092,833.41018,310,000.00 CREM
1052/28/26 0:0044618,910,000.0087,222.53018,910,000.00 CREM
1063/31/26 0:0045619,510,000.0099,885.94019,510,000.00 CREM
1074/30/26 0:0046620,110,000.0099,510.95020,110,000.00 CREM
1085/31/26 0:0047620,710,000.00105,681.69020,710,000.00 CREM
1096/30/26 0:0048621,310,000.00105,197.35021,310,000.00 CREM
1107/31/26 0:0049621,910,000.00111,880.76021,310,000.00 CREM
1118/31/26 0:0050621,910,000.00111,981.76021,400,000.00 CREM
1129/30/26 0:0051622,000,000.00108,850.08021,000,000.00 CREM
11310/31/26 0:0052621,600,000.00110,378.77021,000,000.00 CREM
11411/30/26 0:0053621,000,000.00105,279.70020,400,000.00 CREM
11512/31/26 0:0054620,400,000.00105,670.41019,800,000.00 CREM
1161/31/27 0:0055619,800,000.00102,571.43019,200,000.00 CREM
1172/28/27 0:0056619,200,000.0089,847.89018,600,000.00 CREM
1183/31/27 0:0057618,600,000.0096,369.26018,000,000.00 CREM
1194/30/27 0:0058618,000,000.0090,249.51017,400,000.00 CREM
1205/31/27 0:0059617,400,000.0090,145.45016,800,000.00 CREM
1216/30/27 0:0060616,800,000.0084,228.22016,200,000.00 CREM
1227/31/22 0:0014--0- CREM
1238/31/22 0:0024--0- CREM
1249/30/22 0:0034--0- CREM
12510/31/22 0:0044--0- CREM
12611/30/22 0:0054--0- CREM
12712/31/22 0:0064--0- CREM
1281/31/23 0:0074--0- CREM
1292/28/23 0:0084--0- CREM
1303/31/23 0:0094--0- CREM
1314/30/23 0:00104--0- CREM
1325/31/23 0:00114--0- CREM
1336/30/23 0:00124--0- CREM
1347/31/23 0:00134--0- CREM
1358/31/23 0:001442,000,000.007,110.5302,000,000.00 CREM
1369/30/23 0:001543,000,000.0017,299.1503,000,000.00 CREM
13710/31/23 0:001644,000,000.0024,985.5604,000,000.00 CREM
13811/30/23 0:001746,000,000.0034,473.5306,000,000.00 CREM
13912/31/23 0:001848,000,000.0049,974.1608,000,000.00 CREM
1401/31/24 0:0019410,000,000.0064,452.85010,000,000.00 CREM
1412/29/24 0:0020412,000,000.0073,604.42012,000,000.00 CREM
1423/31/24 0:0021414,000,000.0092,166.45014,000,000.00 CREM
1434/30/24 0:0022416,000,000.00101,441.94016,000,000.00 CREM
1445/31/24 0:0023418,000,000.00116,959.72018,000,000.00 CREM
1456/30/24 0:0024420,000,000.00124,791.94020,000,000.00 CREM
1467/31/24 0:0025422,000,000.00140,728.61022,000,000.00 CREM
1478/31/24 0:0026424,000,000.00151,890.84024,000,000.00 CREM
1489/30/24 0:0027426,000,000.00156,921.89026,000,000.00 CREM
14910/31/24 0:0028428,000,000.00171,513.36028,000,000.00 CREM
15011/30/24 0:0029430,000,000.00174,406.77030,000,000.00 CREM
15112/31/24 0:0030432,000,000.00188,528.60032,000,000.00 CREM
1521/31/25 0:0031434,000,000.00196,421.55034,000,000.00 CREM
1532/28/25 0:0032436,000,000.00184,380.47036,000,000.00 CREM
1543/31/25 0:0033438,000,000.00211,533.73038,000,000.00 CREM
1554/30/25 0:0034440,000,000.00211,831.56040,000,000.00 CREM
1565/31/25 0:0035442,000,000.00227,012.38042,000,000.00 CREM
1576/30/25 0:0036444,000,000.00228,570.71044,000,000.00 CREM
1587/31/25 0:0037446,000,000.00245,330.00044,000,000.00 CREM
1598/31/25 0:0038446,000,000.00241,790.67045,000,000.00 CREM
1609/30/25 0:0039447,000,000.00233,265.18046,000,000.00 CREM
16110/31/25 0:0040448,000,000.00239,277.24046,000,000.00 CREM
16211/30/25 0:0041448,000,000.00226,690.83046,000,000.00 CREM
16312/31/25 0:0042448,000,000.00232,979.88046,000,000.00 CREM
1641/31/26 0:0043448,000,000.00234,280.20046,000,000.00 CREM
1652/28/26 0:0044448,000,000.00213,071.63046,000,000.00 CREM
1663/31/26 0:0045448,000,000.00236,401.60046,000,000.00 CREM
1674/30/26 0:0046448,000,000.00228,367.60046,000,000.00 CREM
1685/31/26 0:0047448,000,000.00235,379.48046,000,000.00 CREM
1696/30/26 0:0048448,000,000.00227,603.61046,000,000.00 CREM
1707/31/26 0:0049448,000,000.00235,348.04046,000,000.00 CREM
1718/31/26 0:0050448,000,000.00235,567.70046,000,000.00 CREM
1729/30/26 0:0051448,000,000.00228,032.21046,000,000.00 CREM
17310/31/26 0:0052448,000,000.00235,575.22046,000,000.00 CREM
17411/30/26 0:0053446,000,000.00223,051.02044,000,000.00 CREM
17512/31/26 0:0054444,000,000.00220,442.59042,000,000.00 CREM
1761/31/27 0:0055442,000,000.00210,441.51040,000,000.00 CREM
1772/28/27 0:0056440,000,000.00181,046.12038,000,000.00 CREM
1783/31/27 0:0057438,000,000.00190,428.65036,000,000.00 CREM
1794/30/27 0:0058436,000,000.00174,581.22034,000,000.00 CREM
1805/31/27 0:0059434,000,000.00170,370.93032,000,000.00 CREM
1816/30/27 0:0060432,000,000.00155,174.44030,000,000.00 CREM
Sheet7
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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