Handle merged cells