Avatar of Chris Johnsen
Chris Johnsen asked on

Export excel to word multiple times on single row if needed

Have a excel sheet that has many rows of data in it ( about 500 ).  Need a way to export each row to a word document.  I know this can be done per row with VB but the issue I am running into is that I have my data on the fourth tab on the excel Sheet and I need to export each row sometime once and other time more then this.  The reason is that it is for a drawing based item and if joe purchased 10 tickets I need to be able to export that row 10 times to a printable ticket to be able to pick from at the end of the drawing.  bit maybe Mary only bought 1 ticket and I need to print that row to word only once.

Any help would be great.

Thank you,

Microsoft WordVB Script

Avatar of undefined
Last Comment
Rob Henson

8/22/2022 - Mon
Rob Henson

I would normally suggest Mail Merge for tasks like this but don't know how you would do the multiple page option.

A representative sample workbook might be helpful.

My gut feeling is that you need some intermediate form of the data, before you export to Word.

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Rob Henson

With Byundt's VBA creating the repeated rows in Excel, you could then use a RANDBETWEEN function to do a random selection of a row rather than printing multiple times and having to cut up for manual drawing.

=RANDBETWEEN(1, 500)   would select a random number between 1 and 500, adjust the 1 to 2 if you have headers in row 1 and the 500 to the number of rows after Byundt's VBA has run.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes