Find numbers and recurrence of a text in Word docs

Strootman

New Member
Joined
Sep 22, 2017
Messages
2
Hello,

I have an excel sheet with a list of texts that I have to locate in a folder with multiple Word documents.
What I want to obtain is, for every text, a report of the number of recurrences found for each documents and the page where the text is present.
I was able to find a code to count the occurrences by converting the documents in .txt, but then I lose the page reference.

Just as an example, imagine the Excel sheet containing a column with the texts to look for:

"Burt"
"Homer"
"Lisa"
"Maggie"
"Marge"

And a folder containing the following Word files:

"Belgium", "Italy", "France", "Germany", "Spain"

I would like the report (still excel) to look something like:

Text Word doc Occurrences Found on Pages

Burt Belgium 4 3,5,7,9
France 3 2,6,9

Homer Italy 1 12

And so on.
Is this possible?

Thanks
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
TextWord docOccurrencesFound on Page
BurtBelgium43,5,7,9
France32,6,9
HomerItaly112

<tbody>
</tbody>

Just realized that the post lost the formatting after submit, the example table should look like the one above.
 
Upvote 0

Forum statistics

Threads
1,214,652
Messages
6,120,747
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top