View Single Post
  #4   Report Post  
Harlan Grove
 
Posts: n/a
Default

"Ron Rosenfeld" wrote...
....
If your HEX numbers are greater than 7FFFFFFFFF post back and I will
post a VBA routine that can convert larger HEX numbers.


Why bother with VBA? 15 decimal digits of precision means the largest
hexadecimal number that could be accomodated without having to resort to
string-based arbitrary precision is 38D7EA4C68000 (=10^15 decimal). Assuming
smaller hexadecimal numbers should always be treated as unsigned, built-in
functions suffice.

=IF(LEN(x)<9,HEX2DEC("0"&x),
HEX2DEC("0"&LEFT(x,LEN(x)-9))*16^9+HEX2DEC("0"&RIGHT(x,9)))