Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-11-2018, 01:15 AM
eerpel eerpel is offline Linking Word and Excel forward and backward Windows 8 Linking Word and Excel forward and backward Office 2013
Novice
Linking Word and Excel forward and backward
 
Join Date: Apr 2018
Posts: 2
eerpel is on a distinguished road
Default Linking Word and Excel forward and backward

Hi,



It's my first time to post here, I hope I'm at the right place.

I want to access data in Excel Sheets via Word. I want to type the name of a steel section in Word and automatically get different information of the choosen section.

I already tried using "vlookup" and "link" to connect Word and Excel which works for one table, but has to be set up again for each new table.
I'm rather looking for a vba solution, but didn't quite find the right way to start.

For summary look at the following picture:
https://imgur.com/a/j9kld
Reply With Quote
  #2  
Old 04-11-2018, 02:40 PM
macropod's Avatar
macropod macropod is offline Linking Word and Excel forward and backward Windows 7 64bit Linking Word and Excel forward and backward Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,366
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

If you create an embedded worksheet in Word, you can use the same kind of external referencing formulae in that worksheet as you would in Excel itself when using a worksheet to reference content in a worksheet in another workbook.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 04-12-2018, 12:33 AM
gmayor's Avatar
gmayor gmayor is offline Linking Word and Excel forward and backward Windows 10 Linking Word and Excel forward and backward Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,137
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Another approach is to read the worksheet into an array and interrogate the array.

With the attached example put the workbook and the document attached into the same folder and open the document. Allow the macros to run and follow the instructions on screen. Adapt the process to your workbook and document.
Attached Files
File Type: xlsx ExampleData.xlsx (8.4 KB, 9 views)
File Type: docm P120.docm (54.7 KB, 9 views)
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #4  
Old 04-12-2018, 02:29 AM
eerpel eerpel is offline Linking Word and Excel forward and backward Windows 8 Linking Word and Excel forward and backward Office 2013
Novice
Linking Word and Excel forward and backward
 
Join Date: Apr 2018
Posts: 2
eerpel is on a distinguished road
Default

@gmayor:
Your example does exactly what I was looking for. Unfortunally the complexity of your code is way beyond my understanding of vba. It would take an unreasonable amount of effort for me to understand and - I imagine - for you to explain what is going on there.

That's why my stupid question, is there a way to do it simplier?

To add some context: I'm using Cell references in Word to do calculations and I don't want to type in section data by hand. When the table is prepared, I just want to copy the complete table and reuse it over and over again.
Attached Files
File Type: docx Nachweis Biegedrillknicken.docx (196.1 KB, 9 views)
File Type: xlsx Profile.xlsx (40.5 KB, 9 views)
Reply With Quote
Reply

Tags
link, vlookup



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking Word and Excel forward and backward Word linking to Excel (hidden Excel) Doug Needham Word 5 11-04-2014 09:20 PM
Linking Word and Excel forward and backward Linking to word to excel Nicholas_jay Word 4 04-13-2014 10:15 PM
Linking Excel into a MS Word??? markpymm Office 0 07-05-2013 04:12 AM
Linking Word and Excel forward and backward linking to excel from word jillapass Word VBA 5 06-08-2012 01:28 AM
Linking from Excel to Word streng Word 4 10-28-2008 08:23 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:26 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft