Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
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 C--> !DATECREATED
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 K-->!DATECOMPLETE
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!
 
Old July 27th, 2011, 09:27 AM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

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

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

VBA Tips & Tricks (http://www.vbadud.blogspot.com)
 
Old February 1st, 2017, 10:39 AM
Registered User
 
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.





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 10: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 05:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.