I want to check a column of data for duplicates. I am writing the column out line by line in VBA taken from other sheets based on certain criteria.
Column A are serial numbers
When I am done I want column F to list the row # of any duplicate serial numbers in the list.
Example if the same serial # appears in lines 1,3,5,7,9
I want Row F1 to list 3,4,5,9
Row F3 to list 1,5,7,9
Row F5 to list 1,3,7,9
Etc
I can do this by completing the list, then using nested for next loops to look down the column take the first cell, compare it to all the others and when it finds a match, write that row value out to Cell F, and concatenate on to any other values that are there.
This is a giant list through and that would take forever -search thousands of lines for each of thousands of lines. There must be a more elegant solution.
I want to do this without sorting the list if possible.
Column A are serial numbers
When I am done I want column F to list the row # of any duplicate serial numbers in the list.
Example if the same serial # appears in lines 1,3,5,7,9
I want Row F1 to list 3,4,5,9
Row F3 to list 1,5,7,9
Row F5 to list 1,3,7,9
Etc
I can do this by completing the list, then using nested for next loops to look down the column take the first cell, compare it to all the others and when it finds a match, write that row value out to Cell F, and concatenate on to any other values that are there.
This is a giant list through and that would take forever -search thousands of lines for each of thousands of lines. There must be a more elegant solution.
I want to do this without sorting the list if possible.