Skip to content

Instantly share code, notes, and snippets.

@sgoley
Forked from msubel/uuid_v4_excel_formula.txt
Created February 26, 2021 22:19
Show Gist options
  • Save sgoley/43a73578e427e200b2fd15395ec0d911 to your computer and use it in GitHub Desktop.
Save sgoley/43a73578e427e200b2fd15395ec0d911 to your computer and use it in GitHub Desktop.
An Excel Fromula to generate a UUID v4
=LOWER(CONCATENATE(DEC2HEX(RANDBETWEEN(0;POWER(16;8));8);"-";DEC2HEX(RANDBETWEEN(0;POWER(16;4));4);"-";"4";DEC2HEX(RANDBETWEEN(0;POWER(16;3));3);"-";DEC2HEX(RANDBETWEEN(8;11));DEC2HEX(RANDBETWEEN(0;POWER(16;3));3);"-";DEC2HEX(RANDBETWEEN(0;POWER(16;8));8);DEC2HEX(RANDBETWEEN(0;POWER(16;4));4)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment