Hi Guys,

I get an error for 'countc = cell.Offset(0, 5).Value' when I run this code. Somebody knows what could be the problem ?

With Worksheets("Mechanismen volgens object")
Set rng = .Range(.Cells(2, 1), .Cells(Rows.Count, 1).End(xlUp))
End With

For Each cell In rng
countc = cell.Offset(0, 5).Value
If cell.Offset(0, 2).Value = "x" Then
s = s & countc & cell.Value & Chr(10)
End If
Next