So, I'm converting bond prices from a price feed which takes the form ###.@@%
where # = normal integers
@@= are @@/32
and % = 1/8 of 32nds
Anyway, to my question:
Say i have 103.215 in cell A1 - that's 103 + 21/32 + 5/256
So, to convert that, I have the formula in the adjacent cell:
=INT((A1-INT(JA1))*100)
I'm taking the approach of breaking out the digits behind the decimal into @@ and % and then converting and then adding them together to get the decimal form. That formula gives me the whole number 21, which i can then convert to 32nds by dividing. Now let's say I have the number 103.21 in Cell A1 - the output of that formula is 20!!!
The error only happens when there are two digits ONLY behind the decimal.
How does the INT function work that it makes this silly error? I've also tried TRUNC but that gives me the same output.
Bookmarks