Did you press CTRL + SHIFT + ENTER? The formula will not work otherwise. On my trials, it matched your example output exactly.
ps. OK, Expanding Alternate w entire columns doesn't work. Paste this ARRAY FORMULA in D5 and copy down:
=IFERROR(INDEX($A$5:$A$28,MATCH(0,COUNTIF($D$4:$D4,$A$5:$A$28),0)),"")
Now paste this ARRAY FORMULA in E5 and copy down:
=IFERROR(INDEX($B$5:$B$28,MATCH(0,COUNTIF($D5:D5,$B$5:$B$28)+($A$5:$A$28<>$D5),0)),"")
Bookmarks