View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default How can I count specific words found across multiple spreadsheets.

Another play, which gives better clarity
on the make up going into the total count(s)

In a new sheet,
Use this sub to quickly list all 50 source sheetnames in A3 down

Sub ListSheetNames()
Dim wkSht As Worksheet
Range("A3").Select
For Each wkSht In Worksheets
Selection = wkSht.Name
ActiveCell.Offset(rowOffset:=1, columnOffset:=0).Activate
Next wkSht
End Sub

Enter
in B1: Montana (the text string to search)
in B2: A:IV (the range to search in each sheet)

Then place in B3:
=COUNTIF(INDIRECT("'"&$A3&"'!"&B$2),"*"&B$1&"*")
Copy down to the last sheetname in col A to return the counts from each
source sheet. Then just SUM col B for the result. Adapt to suit. As-is,
formula can be copied across/filled down to search for other strings in
ranges as may be desired (in C1/C2, D1/D2, etc).

You might want to set calc mode to manual if you're searching in entire
sheets (calc-intensive). Just press F9 to recalc when ready.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"dutton.dn" wrote:
Trying to create a counted total of occurrences that a specific string is
found in multiple spreadsheets, (ie: look for the string "Montana" across
more than 50 different Excel documents) returning a counted single result in
a single spreadsheet.