![]() |
#1
|
|||
|
|||
![]()
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 |
#2
|
||||
|
||||
![]()
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] |
#3
|
||||
|
||||
![]()
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.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#4
|
|||
|
|||
![]()
@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. |
![]() |
Tags |
link, vlookup |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Doug Needham | Word | 5 | 11-04-2014 09:20 PM |
![]() |
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 |
![]() |
jillapass | Word VBA | 5 | 06-08-2012 01:28 AM |
Linking from Excel to Word | streng | Word | 4 | 10-28-2008 08:23 AM |