PDA

View Full Version : VBA code to search an Excel file from Word



iLovePC
07-26-2013, 08:16 PM
Hello,

I am very new to VBA so I apologize in advance if my question is stupid. I have an excel sheet containing two columns of data. One column has the name of the item and the other column has the price of the item.

What I would like to write a VBA macro in Word that will search the excel file for a given item name and find the corresponding price and store it in a variable. Any simple way to do this using VBA. Thanks in advance.

fumei
07-26-2013, 09:40 PM
What have you found so far? Have you done any searching for this? It is not an uncommon request. There may be something here to get you started. Did you check the Excel forum as well?