|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Search Word, Cross reference Excel worksheet and return Value in adjacent cell
Hello All, I'm a newbie Macro user and have been trying to learn as I go. I've managed to find a way of searching documents to copy multiple words and paste into another blank document (may be easy but I was pretty excited). I now have a more complicated task that I am hoping to make easier with a Macro, however it is well beyond my capabilities. Task: I need to "search" and entire document (header, footer, body, sections, tables, etc) to find part numbers that begin with "A_" or "B_" since these are old part numbers. The underscore (_) is part of the number. I have a spreadsheet with the NEW part numbers that I need to replace the old ones with. I'm reading that it may be similar to another thread but I am not proficient enough to adjust it for my needs. Can someone assist me adjusting the macro? Thread I read through: https://www.msofficeforums.com/word-...sing-word.html I need it to: - Pop-up a window so that I can type "A_" and have it find all part numbers that begin with that. - I can define the location of the worksheet, which contains a column with the part numbers, and embed the file name and location in the Macro (if you help direct me to the spot in the macro). Last edited by EveryDayLearner; 12-16-2019 at 10:31 AM. |
#2
|
||||
|
||||
I suggest looking at: https://www.msofficeforums.com/word-...er-footer.html. The macro there processes the document body, headers & footers in all documents in the selected folder. As coded, it replaces all terms from column A of the designated Excel worksheet with the corresponding terms from column B.
To process a single document, you could simply put it in a folder on its own. Alternatively, it could be edited to process only the active document.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thank you. I will check that post.
|
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Search for multiple texts in cell, return specific text | mariur89 | Excel | 4 | 12-14-2014 01:33 AM |
Reference another workbook and return values from the same cell across multiple sheets/tabs | lwls | Excel Programming | 5 | 11-08-2014 02:11 PM |
Assign the value of a cell as a cell reference of another cell in Excel 2010 - How to? | bharathkumarst | Excel | 7 | 10-13-2014 10:25 AM |
Search cell text from Excel into ms-word | ShailShin | Word VBA | 1 | 04-21-2014 02:12 AM |
How do I return from a cross reference? | smoggymark | Word | 0 | 10-21-2008 07:45 PM |