View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
WhytheQ WhytheQ is offline
external usenet poster
 
Posts: 246
Default On Error problem

not too sure why the attached doesn't work.
It seems like the error generated by the vlookup isn't covered by "On
Error" - the error is 1004

'====================================
For Each cell In .Range("T9:T369").Cells
On Error GoTo found_It:
myRoom = WorksheetFunction.VLookup(cell.Value,
ThisWorkbook.Range("myRange"), 1, False)
.Range("T" & cell.Row & ":DZ" & cell.Row).ClearContents
found_It:
Next cell
'====================================

any one got any ideas?

Regards,
Jason Quirk