Hi, BharathBabu!
Had read the posted link you've found out that it says "from one column", which BTW isn't your case. So it works for the given and assumed conditions.
Now give a look at the uploaded file. It does the job of converting your 2 dimensional range in 1 column range, so as the method would apply.
It uses 3 dynamic named ranges:
AllList: =DESREF(Sheet2!$A$2;;;CONTARA(Sheet2!$A:$A)-1;1) -----> in english: =OFFSET(Sheet2!$A$2,,,COUNTA(Sheet2!$A:$A)-1,1)
UniqueList: =DESREF(Sheet2!$B$2;;;CONTARA(Sheet2!$B:$B)-1;1) -----> in english: =OFFSET(Sheet2!$B$2,,,COUNTA(Sheet2!$B:$B)-1,1)
FinalList: =DESREF(Sheet2!$C$2;;;COINCIDIR("";Sheet2!$C:$C;0)-2;1) -----> in english: =OFFSET(Sheet2!$C$2,,,MATCH("",Sheet2!$C:$C,0)-2,1)
Formulas:
A2: =SI(INDICE(Sheet1!A:Z;ENTERO((FILA()-1+COLUMNAS(Sheet1!A:Z)-1)/COLUMNAS(Sheet1!A:Z));RESIDUO(FILA()-2;COLUMNAS(Sheet1!A:Z))+1)="";"";INDICE(Sheet1!A:Z;ENTERO((FILA()-1+COLUMNAS(Sheet1!A:Z)-1)/COLUMNAS(Sheet1!A:Z));RESIDUO(FILA()-2;COLUMNAS(Sheet1!A:Z))+1)) -----> in english: =IF(INDEX(Sheet1!A:Z,INT((ROW()-1+COLUMNS(Sheet1!A:Z)-1)/COLUMNS(Sheet1!A:Z)),MOD(ROW()-2,COLUMNS(Sheet1!A:Z))+1)="","",INDEX(Sheet1!A:Z,INT((ROW()-1+COLUMNS(Sheet1!A:Z)-1)/COLUMNS(Sheet1!A:Z)),MOD(ROW()-2,COLUMNS(Sheet1!A:Z))+1)) -----> in english:
B2: =SI.ERROR(INDICE(AllList;COINCIDIR(0;INDICE(CONTAR.SI($B$1:B1;AllList);0;0);0));"") -----> in english: =IFERROR(INDEX(AllList,MATCH(0,INDEX(COUNTIF($B$1:B1,AllList),0,0),0)),"")
C2: =SI.ERROR(INDICE(UniqueList;FILA()-1+CONTAR.SI(B$2:B2;""));"") -----> in english: =IFERROR(INDEX(UniqueList,ROW()-1+COUNTIF(B$2:B2,"")),"")
Copy A2:C2 down as required (at least until a group of blank entries appear at the end of column A, indicating that there's no more data from input), in the example light orange background is used to indicate up to what extent formulas were copied.
Just advise if any issue.
Regards!
PS: BTW, hope you don't care about running time; if you do, then go for Marc L's dictionary approach.