ALL
I use the function below to search my data, what i would like to be able to do is find the shortest method possible of searching the sheet and then pasting the rows found into another sheet.
Thanks for looking
Gibbo
[VBA]Function fnFind(strFind, Optional sh) As Range
If IsMissing(sh) Then Set sh = ActiveSheet
On Error Resume Next
Set fnFind = sh.Cells.Find(What:=strFind, _
After:=ActiveCell, _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
End Function
Sub TestfnFind()
Dim SearchFor As Range
Set SearchFor = fnFind(InputBox("What do you want to search for", "Search"))
If SearchFor Is Nothing Then
MsgBox ("Sorry Not Found")
Else
SearchFor.Select
End If
End Sub
[/VBA]