LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Error handling

I am unable to handle a ceratin error that crops up when
the following code is run.

Sub compare()
Application.ScreenUpdating = False
Dim cell As Range
For Each cell in Sheets("Sheet2").Range("A2:A501")
Range("E6:E" & Range("E65536").End(xlUp).Row).Find
(cell.Value).Activate
'do stuff if cell.value found
Next cell
Application.ScreenUpdating = True
End Sub

My problem occurs when a value on sheet2 is not found in
column E on sheet1. I need an error handler to skip the
part that does stuff and starts again at Next cell.

Thanks in advance.

Gareth
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Handling #NUM! error Michel Khennafi Excel Worksheet Functions 1 February 26th 07 08:49 PM
Error Handling bw Excel Programming 3 June 20th 04 06:43 PM
Error Handling Todd Excel Programming 1 February 13th 04 11:29 PM
Error handling Tim C Excel Programming 1 October 7th 03 10:00 PM
Error handling John Pierce Excel Programming 3 October 3rd 03 12:17 PM


All times are GMT +1. The time now is 09:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"