eg,
A B
2 x
2 y
1 y
3 x
3 y
3 y
you can have x or y against 1, dosent matter, prob is with 2 and 3.
no its not working..
sorry i m n00b in vba.But
the logic will be like this
consider range of column A is A1:A20 => output will be B1:B20
start from A1 -> store it in a temp variable
Read A2 cell value & compare it with the temp variable if = then put y else put x
this will go on till A20
temp variable will always store the previous cell value