Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old July 19th, 2011, 02:10 PM
Registered User
Join Date: Jul 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Macro to transpose data from Excel to Word.

Hello! I'm an intern at a company and I need help with a problem I'm having.

I need to create a macro to copy a row of cells from an Excel spreadsheet to a Word template.

Ideally, the macro would work like this.

1. The user highlights a row of cells.
2. The row of data has cells that fall under different categories defined by the columns they are in.
3. The macro would then paste the cells to corresponding locations in the Word template.

Column A --> !JOB
Column B --> !SHIPPER
Column D--> !CUSTOMER
Column E--> !FANALYST
Column F--> !COUNT
Column G--> N/A (Not Applicable)
Column H--> !DEVNUM
Column I--> !LOT
Column J--> N/A
Column L--> N/A (Not Applicable)

Can anyone give me an example on how to do this?
Or link me to some literature that can help me?

Thank you in advance. I would appreciate any help greatly.

I have attached examples for reference.

Thanks any help is greatly appreciated!
Reply With Quote
  #2 (permalink)  
Old July 27th, 2011, 09:27 AM
Friend of Wrox
Points: 3,060, Level: 23
Points: 3,060, Level: 23 Points: 3,060, Level: 23 Points: 3,060, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Sep 2005
Location: , , .
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts

What would trigger the macro. Do you have a button or something to do that?

Anyways here is one solution to your problem (http://vbadud.blogspot.com/2009/08/u...ith-excel.html)

Have bookmarks in the Template where you want the information to be used and use the snippet

C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips & Tricks (http://www.vbadud.blogspot.com)
Reply With Quote
  #3 (permalink)  
Old February 1st, 2017, 09:39 AM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Feb 2017
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation changing excel spreadsheet automatically updating a word template

Good Afternoon I need assistance with a Macro for Excel.
After many video's and screening websites I still do not have the right answer!

I work for a property company and came up with an idea.
We have a excel template our managers fill in with relevant data for each tenant for us to Draft a offer.

I need a macro to move data for example from cell C4:D4 (Called "Tenants name") to my bookmark in word called Lessee_name. And replace it the tenants name.

Everytime I paste the macro off forums etc it gives me an error. If this works I would then update the macro to insert the tenants other details and have it update automatically everytime I receive a excel template for the different tenant.

This is much appreciated.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Loop to insert excel data into word userform cjcant Word VBA 18 July 21st, 2011 06:08 AM
excel data into word cjcant Word VBA 10 June 13th, 2011 06:43 AM
Transpose of data in a table... budha Oracle 0 February 16th, 2010 09:44 AM
Transpose the data yogeshyl Excel VBA 2 September 15th, 2007 11:09 AM
How to Transpose this type data jaincafe Access 1 November 27th, 2006 04:58 AM

All times are GMT -4. The time now is 04:28 AM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.