CodingExcel VBA code

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  Mod_Inside (MODINSIDE)  
 To:  ALL
41798.1 
Hi folks glad to see this place is still going strong !

I was wondering if someone could point me in the right direction here.

I have two search macros as below

Sheets("IMPORT").Select
    Cells.Find(What:="93167284", After:=ActiveCell, LookIn:=xlFormulas, _
        LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
        MatchCase:=False, SearchFormat:=False).Activate
    Rows(ActiveCell.Row).Select
    Selection.Cut
    Sheets("Main").Select
    Rows("2:2").Select
    ActiveSheet.Paste
    Sheets("IMPORT").Select
    
    Sheets("IMPORT").Select
    Cells.Find(What:="3700401", After:=ActiveCell, LookIn:=xlFormulas, _
        LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
        MatchCase:=False, SearchFormat:=False).Activate
    Rows(ActiveCell.Row).Select
    Selection.Cut
    Sheets("Main").Select
    Rows("3:3").Select
    ActiveSheet.Paste
    Sheets("IMPORT").Select

What code can i put in between those so it doesnt fall over if it doesnt find what its looking for and just moves onto the next find ?

Many thanks in advance
    
0/0
 Reply   Quote More 

Reply to All    
 

1

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats