I have sheet with some data where B column has some ID's out of which few are duplicates. This data is from 3 sources which are S1, S2, S3. data source is present in "F" column.
Can someone help me with a VBA code that finds the duplicates from column "B" and then out of the dupicates find if one line of data is from S1 or S2 and other line is from S3 then the code has to retain line from S3 and need to delete lines from S1 and S2.
Below is the sample data. The code has to remove 1st and 4th row data.
Can someone help me with a VBA code that finds the duplicates from column "B" and then out of the dupicates find if one line of data is from S1 or S2 and other line is from S3 then the code has to retain line from S3 and need to delete lines from S1 and S2.
Below is the sample data. The code has to remove 1st and 4th row data.
Column A - Name | Column B - ID's | Column F - Source name |
---|---|---|
John | 324 | S2 |
Mary | 566 | S1 |
Mary | 566 | S2 |
Bane | 456 | S1 |
John | 324 | S3 |
Bane | 456 | S3 |