ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IntToHex Error (https://www.excelbanter.com/excel-worksheet-functions/66871-inttohex-error.html)

Debs

IntToHex Error
 
I have a list of decimals ie. Cell B1 = .52399 and I would like to format
these cells to view them multiplied by 100000 and converted to Hex. So I
have used the formula
=INTTOHEX(B1*100000). This formula almost works but it is off. It should
give me a HEX value of CCAF however it gives me a value of CCAE!!! I think
this might be because INT seems to have a round down function of some sort.
Is there anything I do to fix this??

Bob Phillips

IntToHex Error
 
Try rounding it as I am sure it is due to FP arithmetic

=DEC2HEX(ROUND(B1*100000,0),4)

DEC2HEX is the English function, you might need to use a local language
version and maybe semi-colons not commas.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Debs" wrote in message
...
I have a list of decimals ie. Cell B1 = .52399 and I would like to format
these cells to view them multiplied by 100000 and converted to Hex. So I
have used the formula
=INTTOHEX(B1*100000). This formula almost works but it is off. It should
give me a HEX value of CCAF however it gives me a value of CCAE!!! I

think
this might be because INT seems to have a round down function of some

sort.
Is there anything I do to fix this??





All times are GMT +1. The time now is 08:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com