Dividing table into two tables with equal number of columns

JimS63

New Member
Joined
Dec 8, 2020
Messages
21
Office Version
  1. 365
Platform
  1. Windows
Good morning.
I have a table that has ten columns with values imported from other sheets into the cells.

I want to ultimately be able to copy tables into word for a report. The issue comes from every time I do the report I have a different number of products in the ten column table. I would like to be able to split the table into two tables with a maximum of five columns equally divided into the two tables. If there are less than four products I would like one table. If there are more than four products I would like the main table split into two tables with an equal number of columns.

The number of columns would be determined by the name cell being occupied. If it is empty then the remaining columns are not included in the resulting tables.

Then I want to be able to copy the results into word.

I have uploaded images of the tables as examples. Is there an easy way to do this with a macro?

Full Table

038hu5TgnW.png

Less than four columns

0OdDdID8r6.png

More than four columns
0NzQmv9bzZ.png
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Is there any additional information you all need to help resolve this issue?
 
Upvote 0

Forum statistics

Threads
1,215,836
Messages
6,127,180
Members
449,368
Latest member
JayHo

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