I am very dust at this and trying to write something that will help with saveing time... This code works great unless, the name it is searching for is not found, I would like to figure out how to tell it to bypass to next section of code if it does not find the name
here is my code....
Sub Macro1()
'
Sheets("PerformX Management").Select
Cells.Find(What:="Anthony Piccolo", After:=ActiveCell, LookIn:=xlFormulas _
, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
Range(Selection, Selection.End(xlToRight)).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Anthony Piccolo").Select
Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
End Sub
I repeat this code with all the names i need to find, so it is long, but this is the basic code.
I think there is a way to acomplish what I want to do, but I am not sure how it works, I think it is something like
If Dir(??what to put here??) = "??" Then
MsgBox fname & " not found."
Else
' code if file exists
End If
Thanks for the help
Mike
here is my code....
Sub Macro1()
'
Sheets("PerformX Management").Select
Cells.Find(What:="Anthony Piccolo", After:=ActiveCell, LookIn:=xlFormulas _
, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
Range(Selection, Selection.End(xlToRight)).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Anthony Piccolo").Select
Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
End Sub
I repeat this code with all the names i need to find, so it is long, but this is the basic code.
I think there is a way to acomplish what I want to do, but I am not sure how it works, I think it is something like
If Dir(??what to put here??) = "??" Then
MsgBox fname & " not found."
Else
' code if file exists
End If
Thanks for the help
Mike