How can I get numbers to recognize the numbers I input as hex values?

For example, if I set the cell format to base 16 and input 100 into the cell it converts it to 64, but I want it to be 0x100!! If I type in a00 it interprets it as text. Any ideas??

Numbers-OTHER, Mac OS X (10.6.7)

Posted on Jun 8, 2011 10:39 AM

Reply
3 replies

Jun 8, 2011 11:18 AM in response to andrewfromlincoln

What you have discovered is that numeral entry requires entering the number as a decimal number, as per your first example.


If you want to enter a number as hex (as in A00 or 64 or FF), the cell format should be text. You can use these text "numbers" in formulas by converting them with the HEX2DEC function.


You can create a custom format for the cells that looks like 0x@ which means put "0x" in front of whatever text you type in the cell.

Jun 8, 2011 11:18 AM in response to andrewfromlincoln

0x64 is the same as 100 (decimal). When you format a cell as hex you still enter the values as decimal. Numbers will display the value in hex.


If you want to enter a hex value and get the decimal value then you can use the formula HEX2DEC()


For instance if A1 is a cell where you enter a hex value and B1 = HEX2DEC(A1)


Then is A1 = 100, B1 will show 256

Jun 8, 2011 4:54 PM in response to Wayne Contello

Wayne Contello wrote:


0x64 is the same as 100 (decimal). When you format a cell as hex you still enter the values as decimal. Numbers will display the value in hex.


If you want to enter a hex value and get the decimal value then you can use the formula HEX2DEC()


For instance if A1 is a cell where you enter a hex value and B1 = HEX2DEC(A1)


Then is A1 = 100, B1 will show 256


I understand that.. I'm looking for a way for numbers to recognize that the numbers I'm putting in are hex values. So in the 100 example above.. I want to type in 100, numbers to display it as 100, however the value of the cell to be 256 in decimal. I'd like this so I can do some simple arithmetic operations (like auto incrementing by pulling down the corner, etc.) and so I can cut and paste values from a table and have everything "just work" as Steve would say. Seems like the only solution would be to copy and paste the numbers in as text values in, then have a second column that converts them to decimal, do operations on those, then convert them back to hex... bleh.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How can I get numbers to recognize the numbers I input as hex values?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.