Merge cells by state