VBA to create new tables below existing table depending on variables

pscofe

New Member
Joined
Jan 24, 2020
Messages
37
Office Version
  1. 365
Platform
  1. Windows
Hi, so I have the table below which will change daily:

local_acc_noclosing_balancecurrencyclosing_balance_eurstmt_dateFEED_TYPEbalanceDayCountTeamComments
Paul
-3,830,439.00​
JPY
-32,700.77​
15/04/2020 00:00:00STM
43,597,701.00​
1​
AExpense
Jack
-2,248,520.60​
IDR
-132.17​
15/04/2020 00:00:00STM
-2,248,520.60​
3​
BExpense
Chris
-1,713,448.18​
USD
-1,571,250.05​
15/04/2020 00:00:00STM
10,330,502.38​
2​
AExpense
John
-1,163,793.13​
USD
-1,067,210.57​
15/04/2020 00:00:00STM
251,530.81​
1​
AExpense
Steven
-919,493.09​
USD
-843,184.86​
15/04/2020 00:00:00STM
337,087.79​
2​
BExpense
Marianne
-6,568.79​
EUR
-6,568.79​
15/04/2020 00:00:00STM
13,018,289.65​
2​
BExpense
Mary
-69.80​
RON
-14.44​
15/04/2020 00:00:00STM
-69.80​
5​
AWrite off
Jane
-36.92​
EUR
-36.92​
15/04/2020 00:00:00STM
0.00​
31​
AWrite off
Julia
-4.00​
ISK
-0.03​
15/04/2020 00:00:00STM
0.00​
34​
CWrite off
Tony
-1.00​
JPY
-0.01​
15/04/2020 00:00:00STM
0.00​
5​
CWrite off
Harry
-0.54​
CHF
-0.51​
15/04/2020 00:00:00STM
-0.54​
29​
AWrite off
Sebastian
-0.36​
NOK
-0.03​
15/04/2020 00:00:00STM
0.05​
1​
CWrite off
Nicola
-0.31​
SEK
-0.03​
15/04/2020 00:00:00STM
-0.31​
5​
AWrite off

I need a VBA code to put into a macro:

I want to keep that table where it is but two lines below, to have the headings and all the Team A together. Then a table two lines below that one, with headings and Team B. Etc.

local_acc_noclosing_balancecurrencyclosing_balance_eurstmt_dateFEED_TYPEbalanceDayCountTeamComments
Paul
-3,830,439.00​
JPY
-32,700.77​
15/04/2020 00:00:00STM
43,597,701.00​
1​
AExpense
Chris
-1,713,448.18​
USD
-1,571,250.05​
15/04/2020 00:00:00STM
10,330,502.38​
2​
AExpense
John
-1,163,793.13​
USD
-1,067,210.57​
15/04/2020 00:00:00STM
251,530.81​
1​
AExpense


local_acc_noclosing_balancecurrencyclosing_balance_eurstmt_dateFEED_TYPEbalanceDayCountTeamComments
Jack
-2,248,520.60​
IDR
-132.17​
15/04/2020 00:00:00STM
-2,248,520.60​
3​
BExpense
Steven
-919,493.09​
USD
-843,184.86​
15/04/2020 00:00:00STM
337,087.79​
2​
BExpense
Marianne
-6,568.79​
EUR
-6,568.79​
15/04/2020 00:00:00STM
13,018,289.65​
2​
BExpense

Also, anyway I can change the date to get rid of the 00:00:00?

Really appreciate the help!
Thanks,
P
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

Forum statistics

Threads
1,214,808
Messages
6,121,681
Members
449,048
Latest member
81jamesacct

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