week = 1 y = 3 z = 18 For l = LBound(arr1) To UBound(arr1) Range("A1").Value = WorksheetFunction.CountIfs(Range("B2:B250"), week) x = R