Hi all,

I have 12 worksheets to cycle thru to match a value (recID) in column A and then clear the contents in that row and write new info to.

if I set n=1 and the col has a match, it returns the correct row number, but if there is no match I get the 1004 error.
When I tried to handle the error I made a mess.
Now I get next without for.

I might punching above my weight on this effort.

Sub test_match(rec) ', wsName As String)
Dim myvalue As Variant
'Stop
'n = 2
'wsName = "master"
For n = 1 To 12
    'Set ws1 = Sheets(n)
    Sheets(n).Activate
    myvalue = WorksheetFunction.Match(rec, Range("A1:A150"), 0)
        If myvalue Is Nothing Then
        Next n
        End If
MsgBox (myvalue)
Next n
End Sub
thanks