What is : 5 or 13 characters, or 10 or 26 characters using digits 0 - 9
and letters A - F? Some say i should use the DEC2HEX formula, but
i still don't know how...
If the string of characters is composed of just 0-9 and A-F (or a-f),
you have a hexadecimal number (aka "hex" number). You would use
HEX2DEC, not DEC2HEX, to convert it.
However, HEX2DEC can handle up to only a 10-character hex number. So
HEX2DEC cannot be used easily to conver 13- and 26-character hex
numbers. There is a way to "shift" the result; but you cannot convert
more than a 13-character hex number without losing "precision". That
is, the converted value will no longer match the hex number if it was
14 characters or more.
Also, the HEX2DEC result is a signed number. If the 10-character
string starts with 8 or higher (A-F are higher than 9), you will get a
negative number as the result. That might not be what you intend.
Are you sure you should convert the hex number? In many contexts, the
hex number is an identifier of sorts, not intended to be treated as a
number. For example, a MAC address (which identifies network cards)
is a 12-character hex number. A new standard defines a 16-character
hex number called an EUI. It is currently use for some new network
types (e.g. Infiniband; also IPv6?). (But usually, the MAC and EUI
numbers are written with interstitial colons.)