SQL would be better than Excel, but you could probably do it like this:
Data Sheet
Column A: A list of all people, places, or things.
e.g.
A1: Rufus
A2: Fletch
A3: Belsornig
Column B: An id value. Unique numbers, starting at 1 with an increment of 1. You can write a formula for this; enter B1...