Creating multiple word tables from excel data

wizzard21

New Member
Joined
Sep 17, 2011
Messages
11
Hello all,

I'm new here but hopefully I can still receive some help on my urgent problem. Right now, I'm working on a national survey with valuable data from students. The plan is to turn around, 100 different reports to the departments with their respective students.

The issue that I have is creating multiple tables from multiple sheets in excel into a word table, of course I can do it myself but I was wondering if anyone knows of a way of automating it.

What the tables look like in excel:
kjZNV.png


What I want them to look like in word, with a chart if possible:
XTYOV.png


I realize that I can just copy and paste easy table into word from excel and with a few clicks of a button, get what I want. But i'm looking for something to automate and simplify this process. There are about 300-400 variables that I need to crosstab with certain demographics.

If it matters any, I bought a software package (Q Market Research) but it doesn't make the tables look exactly how I want them to look. The data is from SPSS and for anyone that knows SPSS, those tables are flat out ugly.

Any help would be appreciated.
 
Last edited:

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
So i have figured out how to edit the style and change the way the table looks.

.Style = "GreenBar" refers to the name of the table in microsoft word, you can customize your tables there.

I still need to know if there is anyway to do this on multiple sheets in a workbook and if it is possible to place all the tables from each sheet, one after another in a word document.

Thank you in advance.
 
Upvote 0
Do the tables already exist in excel and you want to insert them in Word...OR...do the tables exist in Word in a template document and want to transfer excel data to the table(s)... OR.. from excel, do you want to open a blank Word document and make tables and insert data? To run for multiple sheets, loop through the sheets. Styles are in the document. I suggest that if you already have the tables made in excel, use VBA to copy them as pictures and insert them in Word. However you need to outline a format for the Word document. If it's always the same, then make a template document with place holders for the tables. If it's not always the same, VBA the Word fomat. Dave
 
Upvote 0
The tables (data) already exist in excel.

So I have figured out how to create the tables from excel in Word, by using the VBA code that I posted and styling the tables in Word.

What I need to do now is create a single word document with multiple tables from excel, these tables are on different sheets. Can I do that with the code I already have?

Thanks again Dave for sticking with me.
 
Upvote 0
is there a way to put a loop around the vba code until it reaches the end of the workbook? going by sheet by sheet?
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,304
Members
452,904
Latest member
CodeMasterX

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