Consulting

Results 1 to 2 of 2

Thread: Help! Help! USing Excel/ VBA find a series of words and return the page # and Line #

  1. #1
    VBAX Newbie
    Joined
    May 2016
    Posts
    1
    Location

    Help! Help! USing Excel/ VBA find a series of words and return the page # and Line #

    Help,

    I have a list of words (about 800 words in the list) in Excel that I want to search/find a 200 page word doc. For each word found I want to:

    Highlight the word in the doc
    For each instance found save on defined Excel worksheet the word, the page# and the line#

  2. #2
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    From the Windows Programs menu, Open Word.

    Start recording a Macro.

    Using only the Keyboard in while in the Word Window,

    • Open a copy of the 200 page Word Doc.
    • Find and highlight one of the words in your list.
    • find and highlight the next instance.
    • repeat one more time.
    • Close and save the copy.


    Now you can use the mouse to stop recording the Macro.

    Open Word VBA, copy the macro and in our Forum Editor, Click the # icon on the menu, then simply press Ctrl+V to paste your code in between the CODE Tags.
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •