Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, I got the Cells.Find line by recording the Macro so I don't really
understand how the code works. Basically I'm just copying a cell from one spreadsheet and going to the other and trying to find it in there. It's working fine when it's able to find a matching cell, but it comes up with an error when it doesn't. All I want is to be able to stop it when it doesn't come up with a match without the error message. Any suggestions? Thanks ahead of time for the help. Selection.Copy x = ActiveCell Windows("VOD Master List as of 06-19-07.xls").Activate Cells.Find(What:=x, After:=ActiveCell, LookIn:=xlFormulas _ , LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).Activate |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe:
On Error Resume Next ' switch off error check Cells.Find(What:=x, After:=ActiveCell, LookIn:=xlFormulas _ , LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).Activate On Error Goto 0 ' switch on error check Regards Trevor wrote in message ups.com... Hi, I got the Cells.Find line by recording the Macro so I don't really understand how the code works. Basically I'm just copying a cell from one spreadsheet and going to the other and trying to find it in there. It's working fine when it's able to find a matching cell, but it comes up with an error when it doesn't. All I want is to be able to stop it when it doesn't come up with a match without the error message. Any suggestions? Thanks ahead of time for the help. Selection.Copy x = ActiveCell Windows("VOD Master List as of 06-19-07.xls").Activate Cells.Find(What:=x, After:=ActiveCell, LookIn:=xlFormulas _ , LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).Activate |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Finding matches in two columns | Excel Worksheet Functions | |||
Finding the cell loacation that matches a specific value in a rang | Excel Worksheet Functions | |||
Finding subsequent matches | Excel Worksheet Functions | |||
Finding matches ( | Excel Discussion (Misc queries) |