I have a workbook, and in column A it has a persons name (first and last), I need to insert a column before A, and in this column I want to add an sfID. Then for each name in column A that does not match the row above it, we increment the ID.
What I need is
1) Sort worksheet Column A ASC
2) Add new Column (so Column A shifts to Column B)
3) Iterate Column B and compare name to next row
4) If names are same, key remains same, if different key increments
Example
sfID | Name
sf_1 | Jason Smith
sf_2 | Nolan Jones
sf_2 | Nolan Jones
sf_2 | Nolan Jones
sf_3 | Mitch McConnel
sf_4 | Jose Sandoval
sf_4 | Jose Sandoval
and we iterate over the entire sheet until no more rows in column B. What would be a VBA macro to accomplish this?
Bookmarks