i have two different sheets. sheet1 has part numbers in one column and 2nd sheet has same part number repeated several times in column1.And for these repeated part numbers in sheet 2 column 1, there is status "YES/no" in column 2. Count the number of "YES" in column 2 for a repeated part number in column 1 of sheet 2 and place the count value in column 2 of sheet1 in ,corresponding row of column 1.

Please provide a Macro for this problem.

Quick response is appreciated.

Thanks..