Formatting hex numbers

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?
 
D

Dave Peterson

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
 
S

Shane Devenshire

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.
 
R

R4ym0nd

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top