Cookie Consent by Free Privacy Policy Generator

Excel - assign a unique number to each set of unique names, where each set consists of repeated names.

assign a unique number to each set of unique names in column B, where each set consists of repeated names.

This can be done using the combination of the MATCH and UNIQUE functions in Excel. Here's how you can do it:

  1. Use the UNIQUE function to generate a list of unique names from column B. This list will also define the order of the unique numbers you want to assign.
  2. Use the MATCH function for each cell in column B to find the position of the name within the unique list, which effectively assigns a unique number to each set of names.
Assuming your data starts in cell B2 and goes down from there, here’s what you would do:

  • In a new column (let's say column C), starting from C2, use the following formula to generate a unique identifier for each group of names:
Code:
=MATCH(B2,UNIQUE(B:B),0)


Count
Code:
=COUNTIF(G:G, G2)
 
Last edited:
Back
Top