Formatting hex numbers

  • Thread starter Thread starter Fan924
  • Start date Start date
F

Fan924

I am dealing with hex numbers of the form
FF
02
30
09
CA
I format the cell as text. Ocassionall the 0's will vanish
FF
2
30
9
CA
Is there a way to fix this and force the two digit format?
 
If the zeros are vanishing, then something is changing the format and the value
(a two step process!).

You can do some detective work to find the reason--and stop it(??).

Or maybe you could change the way you enter the data. You can prefix the entry
with an apostrophe:

'09
 
Hi,

How are you entering the hex values? If you copy and paste onto a Text
formatted cell you wipe out the target cell's format.

An alternative way to enter numbers like 02 is to type '02 (an apostrophy
in front of the entry).

However, in support of what Dave implied, if the cells are formatted to Text
and you type 02 into them they will not loose the leading zeros.
 
You can also custom format the cells.

Go to format cells > number > custom (all the way to the bottom) and in the
"Type" field, just input 00 and the numbers will remain with 2 digits, text
will not be affected.

Hope this is what you're looking for.
 
Back
Top