How to Generate UUIDs in Excel
A UUID (Universally Unique Identifier) is a 128-bit number that's unique across all devices and networks. In Excel, you can generate a UUID using a formula. Here's how:
- Open a new Excel worksheet.
- In cell A1, enter the formula '=CONCATENATE(DEC2HEX(RANDBETWEEN(0,4294967295),8),'-',DEC2HEX(RANDBETWEEN(0,42949),4),'-','4',DEC2HEX(RANDBETWEEN(0,65535),4),'-',DEC2HEX(RANDBETWEEN(16384,20479),4),'-',DEC2HEX(RANDBETWEEN(32768,49151),4),DEC2HEX(RANDBETWEEN(0,65535),4),DEC2HEX(RANDBETWEEN(0,65535),4)).'
- Press Enter to generate the UUID.
The formula creates a random UUID in the format 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx', where 'x' is a hexadecimal digit (0-9, A-F) and 'y' is either 8, 9, A, or B. It uses the RANDBETWEEN function to create random numbers and the DEC2HEX function to convert them to hexadecimal. The CONCATENATE function combines the hexadecimal strings into the UUID format.
原文地址: https://www.cveoy.top/t/topic/ol0n 著作权归作者所有。请勿转载和采集!