For I = 1 To 2
Sheets(I).Select
For Row = 0 To x
Z = Application.CountIf(Range,Criterium)
Sheets("sheet3").Range("B1").Offset(Row, 0).Value = Za = a + 1
Next
Next I
Without the loop for the sheets, it works out fine, and in sheet 3 is shown the results of the CountIf.
With the loop, all the results are 0.
Any idea what the problem is?