VBA: Getting a table into an array

veldthui

New Member
Joined
Dec 1, 2007
Messages
11
I am trying to pull data from a table into an array in VBA but am unsure how to get the table data. Previously I just used a range and loaded the range straight into the array but now want to change to a table format but cannot get the data into the array.

Any help appreciated.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Use the range of the table.
Code:
arrTable = Range("Table1").Value
 
Upvote 0
Use the range of the table.
Code:
arrTable = Range("Table1").Value

That is what I used but it was returning an error. I have tried it again and it now seems to work with all but one table. Maybe something in the table is causing the issue so will redo the table and see how it goes.

Cheers
 
Upvote 0

Forum statistics

Threads
1,218,795
Messages
6,144,527
Members
450,550
Latest member
Melanie_Annies

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