ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Display Binary Leading Zeros (https://www.excelbanter.com/excel-discussion-misc-queries/14684-display-binary-leading-zeros.html)

tocuin hollisgroup com>

Display Binary Leading Zeros
 
All,

Forgive me if I'm just obtuse, but I can't seem to get Excel to display the
leading zeros of binary numbers. (I'm just doing up an ASC/DEC/HEX/BIN cheat
sheet.)

Formatting the cells as "Custom :: 00000000" doesn't work.

Any ideas as to how I do it?

Thanks in advance!

Thomas

Carole O

If this is just a cheat sheet - with no computation involved, try putting a '
in front of the zeros ('0000). The ' won't show in the cell or when you
print it out.

HTH,

Carole O

"tocuin" wrote:

All,

Forgive me if I'm just obtuse, but I can't seem to get Excel to display the
leading zeros of binary numbers. (I'm just doing up an ASC/DEC/HEX/BIN cheat
sheet.)

Formatting the cells as "Custom :: 00000000" doesn't work.

Any ideas as to how I do it?

Thanks in advance!

Thomas


Ron Rosenfeld

On Wed, 23 Feb 2005 13:39:11 -0800, tocuin hollisgroup com <tquinn<atdot
wrote:

All,

Forgive me if I'm just obtuse, but I can't seem to get Excel to display the
leading zeros of binary numbers. (I'm just doing up an ASC/DEC/HEX/BIN cheat
sheet.)

Formatting the cells as "Custom :: 00000000" doesn't work.

Any ideas as to how I do it?

Thanks in advance!

Thomas


How are you generating your binary numbers?

If you are using the ATP function, DEC2BIN, then you should use the optional
"places" argument: e.g. =DEC2BIN(A1,8)

Your custom format won't work as the output of DEC2BIN is a text string, and
not a number (even though it looks like one)

Is this sort of the output format you want?

=====================================
ASC BIN DEC HEX
1 00110001 49 31
2 00110010 50 32
3 00110011 51 33
4 00110100 52 34
5 00110101 53 35

A 01000001 65 41
B 01000010 66 42
C 01000011 67 43

a 01100001 97 61
b 01100010 98 62
c 01100011 99 63
====================================


--ron


All times are GMT +1. The time now is 05:17 AM.

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