How to merge cells based on the value of adjacent cell

HI,

I wish to merge two cells if the value of an adjacent cell is blank.

Pl refer the attached for your quick understanding.

Your help is highly valuable.

AttachmentSize
Real.xlsx12.29 KB

Put the following into cell

Put the following into cell E2 of sheet 1 and paste it down

=IF($C3="",$D2& " " & $D3,IF($C2<> "",$D2,""))