We have a Microsoft Office Macro that performs certain simple statistical calculations on columns in Excel and produces tables in Word. The tables are produced in the order that they appear in Excel columns. Each column has between 4-10 tables since the data in the column is broken out by various variables. So, for example, a column with data about how much students spend on soft drinks will be broken out by various variables in specific tables. So there will be a table for soft drink spending by men and by women, then another for spending by college students vs high school or grammar school students, then another based on income level, or region of the country, etc, etc.
We want to group all the tables related to a given column all one under the other. However, when we currently produce the tables they are spread out all over the manuscript, since we produce many tables at once. WHat we need is some kind of macro that allows us to re arrange the tables in Word so that all the tables based on data in the same Excel column appear in our manuscript one under the other.
We have included some sample output. We don't know if the issue is to adjust our Excel macro or to develop a new program to rearrange the tables in Word automatically.