Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi
unless otherwise specified, the find assumes you are searching the active sheet. if you wish to search other or all sheets do this.... Sub mac1FindAll() Dim c As String Dim sh As Worksheet Dim rng As Range c = InputBox("Enter item to search for") For Each sh In ActiveWorkbook.Worksheets If c < "" Then Set rng = Nothing Set rng = sh.Range("A1:IV65000").Find(what:=c, _ After:=sh.Range("A1"), _ LookIn:=xlFormulas, _ lookat:=xlPart, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False) End If If Not rng Is Nothing Then sh.Activate rng.Select MsgBox "Found on sheet " & sh.Name & " at cell " & _ rng.Address regards FSt1 "kirkm" wrote: Hi, in the following - Dim foundCell As Range Set foundCell = Selection.Find(What:=Format(ChosenDate, "dd mmm yyyy"), _ After:=Cells(rows.Count, 1), _ LookIn:=xlFormulas, _ LookAt:=xlPart, _ SearchOrder:=xlByColumns, _ SearchDirection:=xlNext, _ MatchCase:=False, _ SearchFormat:=False) whereabouts would you specify the Sheet Name ? And does the command foundCell.Select Move to a different sheet, if that's where foundCell is ? Many thanks - Kirk |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel sheet bootom half sheet goes behind top part of sheet | Excel Worksheet Functions | |||
Duplicate sheet, autonumber sheet, record data on another sheet | Excel Worksheet Functions | |||
Export sheet store sheet import sheet. | Excel Programming | |||
relative sheet references ala sheet(-1)!B11 so I can copy a sheet. | Excel Discussion (Misc queries) | |||
Inserting a row in sheet A should Insert a row in sheet B, removing a row in Sheet A should remove the corresponding row in sheet B | Excel Programming |