Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I really appreciate the response. It looks like I still have a lot to learn!
Thank you!! "JLatham" wrote: Pretty much the same as Tom Hutchins has offere, only a little different. And since I was writing while he was posting, figured I'd offer it up anyhow. Instructions for putting it into your workbook are same as he provided. Press [Alt]+[F11] to open the VB Editor, choose Insert -- Module and copy and paste the code into the module presented. Sub CountFoundOnSheets() Dim anySheet As Worksheet Dim searchRange As Range Dim searchResult As Range Dim sheetCount As Integer Dim findWhat As String findWhat = InputBox$("Enter search for phrase:", "Find?", "") If findWhat = "" Then Exit Sub ' no entry made End If For Each anySheet In ThisWorkbook.Worksheets Set searchRange = anySheet.Range("H9:H32") On Error Resume Next Set searchResult = searchRange.Find(What:=findWhat, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False) If Not searchResult Is Nothing Then sheetCount = sheetCount + 1 End If Next MsgBox findWhat & " appears on " & sheetCount & " sheets." End Sub "tgcali" wrote: Hello, How can I count each worksheet a criteria appears on in a range of cells? Not the number of times it appears total, but the number of sheets it appears on. For example: The range is H9:H32, the entry I'm needing to count is "other" and there are 250 sheets. I don't want the total number of times the word "other" appears, but the total number of sheets it appears on in that range. Make sense? Thank you very much in advance. Any assistance would be greatly appreciated. tgcali |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Count and Sum multiple values for a single entry | Excel Discussion (Misc queries) | |||
Fprced data entry on multiple worksheets | Excel Worksheet Functions | |||
Populating Multiple Worksheets with one entry | Excel Worksheet Functions | |||
Merging multiple worksheets into one, with ongoing data entry | Excel Discussion (Misc queries) | |||
data entry on multiple worksheets | Excel Discussion (Misc queries) |