Loop Through an excel column and check if each values has a match on another excel

I have 2 excel files named Recon File and DataExt File. Both files have a column named PNR.

I need to check whether each value in Pnr column of Recon has a match on Pnr column of DataExt. If match is found, check how many matches are there.

If 0 match found, Leave the Column H in Recon as Blank

If 1 Match if found Copy values from cells of D,E,F and G columns corresponding to the matched Pnr Cell to the Recon File in D,E,F,and G.

If 2 Matches are found, Then check whether for the first & Second match the Column named Sector in Recon also matches with the Sector Column in DataExt. If it matches Copy values corresponding to that columns else Copy values to the Return column.

If more than 2 matches found Fill the Recon column as More than 2 matches found.

Can anyone help me with VBA code for excel Macros.

Hi @jishnupnair1996

You can try to see similar threads for inspiration :slight_smile: