Please Help
I need to extract the datas from one column to new column based on its right side column value

for example
A B C
A1100MS 0
A1200MS 2 A1200MS
A1300MS 0
A1400MS 2
A1900MS 0
A1960MS
A0511MS 2
A1001MS 2
A1009MS 0

From above table I want to extract COLUMN A values to column C based on Column B values that is if it is 2 and also column C values should be continous without blank cells

Please help me ,Ineed formula or VBA code

-navanee