Set cell value is 1 in line patterns