There may well be better ways of achieving the.
If the original data was text or values the formulae in ColumnD can then be replaced with Copy/Paste Special/Values. [If the data has adjacent repetition a 'helper' column can be used (say ColumnD here, since the helper column is only temporarily required).