The code in the attached workbook will generate a new ID number based on the greatest value it finds in the D column. If you are inserting a single ID number, position your cursor in the blank cell where you want to place the ID number, and run the macro NewID. If you want to generate more than one, select the cells in which you want to place the ID. CAUTION! This will place an incremented number in EVERY cell you select, so only select cells in the D column. As for your sorting issue, I still need more information. What column are you sorting by, and what other levels of sort are you applying?
Bookmarks