Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or
0
0
0
s2smodern

How to add unique id number column for duplicate rows in Excel?

Supposing there are some duplicate data in a column, now you want to add unique ID number for these duplicate rows as below screenshot shown, do you have any good ways to add them? Here, I introduce a formula to help you quickly handle this job in Excel.
doc unique id number to duplicate rows 1

Adding unique ID number column for duplicate rows with a formula

Adding missing ID number with Kutools for Excelgood idea3


Adding unique ID number column for duplicate rows with a formula


To add unique ID number for duplicate data, you can do as these steps:

1. type 1 into the cell which is adjacent to the first data you want to add ID number.
doc unique id number to duplicate rows 2

2. Then in the cell below it, type this formula =IF(B1=B2,A1,A1+1), press Enter key to get the first result, drag fill handle down until last data showing up.

In the formula, B1, B2 are the first two cells in the duplicate data column, A1 is the first ID cell.
doc unique id number to duplicate rows 3


Adding missing ID number with Kutools for Excel

If you have a list of ID numbers which including some missing numbers as below screenshot shown, you can apply Kutools for Excel’s Find Missing Sequence Number utility to quickly find and add the missing number.
doc unique id number to duplicate rows 4

Kutools for Excel, with more than 120 handy functions, makes your jobs easier. 

After installing Kutools for Excel, please do as below:(Free Download Kutools for Excel Now!)

1. Select the ID numbers you want to insert missing numbers, click Kutools > Insert > Find Missing Sequence Number.
doc unique id number to duplicate rows 5

2. In the popping dialog, you can choose one option to add or highlight missing numbers as you need.
doc unique id number to duplicate rows 6

3. Click Ok. A dialog pops out to remind you the number of missing data, close it. Then all missing numbers have been added or highlighted in the column or beside the column.

Add missing numbers  Find the missing rows
doc unique id number to duplicate rows 7 doc unique id number to duplicate rows 8

Recommended Productivity Tools

Office Tab

gold star1 Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.

Kutools for Excel

gold star1 Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!

gold star1 200 New Features for Excel, Make Excel Much Easy and Powerful:

  • Merge Cell/Rows/Columns without Losing Data.
  • Combine and Consolidate Multiple Sheets and Workbooks.
  • Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
  • Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,
  • More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools...

Screen shot of Kutools for Excel

btn read more      btn download     btn purchase

Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.