Suppose column "A" merged cells - put this in B1 and copy it to fill in the rest of the column:
=IF(ISBLANK(A1);OFFSET(B1;-1;0);A1)
It checks if the cell on the left has a value, if it returns its value, if not, it takes a value from the top cell.
Note that this does not work for empty cells. First, fill in the empty cells in column "A" with something unique, for example, "(empty)", and replace it with a void of both "A" and "B" after filling in the column "B".
plavozont
source share