Splitting table into parts and exporting into Excel using VBA

Imo92

New Member
Joined
Aug 21, 2015
Messages
5
I have a table which has about 30000 rows of records (although this amount does increase and decrease).
I am trying to export this table to an excel file. My problem is I require to split this table into three parts.

These three parts should be exported to individual excel workbooks, or one workbook which has three sheets, each having one part of the table.

I've used the docmd.transferspreadsheet method before, but unsure how to go about splitting the table.

Appreciate the help.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
unless you are using 2003, 30,000 rows shouldn't be a problem and would live on a single sheet
 
Upvote 0
Thanks for your reply. I understand it can live on one sheet however let me explain myself a bit more.

The table is exported to an excel file, and then that export is uploaded elsewhere to another software application, where the excel sheet can only have a maximum of about 15000 records. That is why I require to split them.

Yes I can manually take that excel sheet and split it, but I was hoping to find a way to implement it using VBA, if possible.
Thanks
 
Last edited:
Upvote 0

Forum statistics

Threads
1,221,825
Messages
6,162,166
Members
451,750
Latest member
dofrancis

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