Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to have a notification of "Not Found" if the ID number does not exist on any worksheet, except sheet 1, which is not searched.
I know where to put it if looking at only one sheet, but everywhere I tried it increments sheet by sheet as Not Found until an Id is found then increments on sheets past the found ID. Thanks. Howard 'Else ' MsgBox "No ID found" Sub AllMySheets() Dim ws As Worksheet Dim FindString As String Dim Rng As Range FindString = InputBox("Enter a Client ID numbet") For Each ws In ThisWorkbook.Worksheets If ws.Name < "Sheet1" Then If Trim(FindString) < "" Then With ws Set Rng = .UsedRange.Find(What:=FindString, _ LookIn:=xlValues, _ LookAt:=xlWhole, _ SearchOrder:=xlByColumns, _ SearchDirection:=xlNext, MatchCase:=False, _ SearchFormat:=False) If Not Rng Is Nothing Then MsgBox Rng.Address & " " & ws.Name End If End With End If End If Next ws End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need IF statement to categorize time into "Morning", "Afternoon", "Evening" | Excel Discussion (Misc queries) | |||
Help with setting a "not found" statement | Excel Discussion (Misc queries) | |||
Help with setting a "nof found" statement | Excel Discussion (Misc queries) | |||
Getting "compile error" "method or data member not found" on reinstall | Excel Programming |