Skip to content

Instantly share code, notes, and snippets.

@stekhn
Created February 17, 2016 08:44
Show Gist options
  • Save stekhn/16584703877ca138e5a8 to your computer and use it in GitHub Desktop.
Save stekhn/16584703877ca138e5a8 to your computer and use it in GitHub Desktop.
Generate unique IDs in Excel
=IF(COUNTIFS($B$1:B3;B3)>1;INDEX($A$1:A2;IFERROR(MATCH(B3;$B$1:B2;0);1));MAX($A$1:A2)+1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment