How to copy all data from a multidimension array to a table column?

Jack_881

New Member
Joined
Sep 11, 2020
Messages
16
Office Version
  1. 2019
Platform
  1. Windows
Hi All

I have a procedure that runs a loop to do two things:

1. Collect Data in a 2D array
2. Copy data from a selected dimension, in this case 8 and copy the contents in table column.

part of the code below where it copies the data into the table below:

tbl.DataBodyRange.Cells(i, tbl.ListColumns("COL1").Index) = myRange(i, 8)

The code works fine and does what it needs to, but I am trying to make it run more efficiently by limiting the interaction between VBA and the worksheet.

My questions is, how can I copy all the data from the specified dimension (in this case 8) to the table?

Cheers

Jack
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
You can try this using this syntax but you would need to resize the target range to the same number of rows:
VBA Code:
Application.Index(myRange, 0, 8)
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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