Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Betty
 
Posts: n/a
Default Is there a cell format for HEX numbers?

Hello.

Is there a way to format cells for HEX numbers? I currently have to format
them as text. I would like to be able to automatically increment in HEX, as I
can with general numbers or dates. Is this possible without writing a macro?
  #2   Report Post  
Bill Martin -- (Remove NOSPAM from address)
 
Posts: n/a
Default

Betty wrote:

Hello.

Is there a way to format cells for HEX numbers? I currently have to format
them as text. I would like to be able to automatically increment in HEX, as I
can with general numbers or dates. Is this possible without writing a macro?


To display a decimal number as hex use:

[ ] = DEC2HEX(A1,n)

If it doesn't appear to be part of your Excel setup, then you've got to
install the Analysis ToolPak that came with Excel and enable it
properly. See the help files that Excel provides.

Bill
  #3   Report Post  
Dave O
 
Posts: n/a
Default

When I read the original post it sounds like Betty is starting off with
Hex notation, rather than converting from decimal. If I read it
correctly she needs the Hex entries to be mathematically active within
Excel so she can add to them.

If this is correct, then the best I can come up with is to nest the
HEX2DEC and DEC2HEX formulas to convert Hex to decimal, perform the
increment, and convert back to Hex.

For instance: with the entry A5 in cell A1, the formula in B1 that
increments Hex A5 by decimal 1 is
=DEC2HEX(HEX2DEC(A1)+1)

Betty, are we getting close to an answer you can use?

  #4   Report Post  
Bill Martin -- (Remove NOSPAM from address)
 
Posts: n/a
Default

Dave O wrote:

When I read the original post it sounds like Betty is starting off with
Hex notation, rather than converting from decimal. If I read it
correctly she needs the Hex entries to be mathematically active within
Excel so she can add to them.

If this is correct, then the best I can come up with is to nest the
HEX2DEC and DEC2HEX formulas to convert Hex to decimal, perform the
increment, and convert back to Hex.

For instance: with the entry A5 in cell A1, the formula in B1 that
increments Hex A5 by decimal 1 is
=DEC2HEX(HEX2DEC(A1)+1)

Betty, are we getting close to an answer you can use?




What I meant to imply was that you just let the computer your
calculations in decimal in cell A1 and echo them over to B1 formatted in
hex. Let the computer work in decimal while you watch in hex.

Bill
  #5   Report Post  
Betty
 
Posts: n/a
Default

Thank you both. The spreadsheet I'm working in uses Hex notations - one block
per row, but there are gaps in sequence. I need to fill in those gaps and
continue with new entries. So, I've created a simple fix on another worksheet
-

In cell A1, I enter the existing Hex number
In B1, =HEX2DEC(A1)
In B2, =B1+4096
In C1, =DEC2HEX(B1)

Now I can just drag column B and then column C and cut and paste the numbers
into the gaps in my worksheet. Not very elegant I know, but it beats typing
each row manually!

"Bill Martin -- (Remove NOSPAM from addre" wrote:

Dave O wrote:

When I read the original post it sounds like Betty is starting off with
Hex notation, rather than converting from decimal. If I read it
correctly she needs the Hex entries to be mathematically active within
Excel so she can add to them.

If this is correct, then the best I can come up with is to nest the
HEX2DEC and DEC2HEX formulas to convert Hex to decimal, perform the
increment, and convert back to Hex.

For instance: with the entry A5 in cell A1, the formula in B1 that
increments Hex A5 by decimal 1 is
=DEC2HEX(HEX2DEC(A1)+1)

Betty, are we getting close to an answer you can use?




What I meant to imply was that you just let the computer your
calculations in decimal in cell A1 and echo them over to B1 formatted in
hex. Let the computer work in decimal while you watch in hex.

Bill

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Format numbers in chart datatable MB Charts and Charting in Excel 3 May 29th 05 03:37 PM
Format cell in column B based on value in the next cell (column c) Nicole Excel Discussion (Misc queries) 7 May 18th 05 10:19 PM
How do I format a cell with numbers, text and hyphens Yaya Excel Discussion (Misc queries) 2 March 11th 05 05:33 PM
how to format numbers stored as text or vice versa to use vlookup teneagle Excel Worksheet Functions 1 February 3rd 05 10:41 PM
How do I format a value when using it within a cell reference tha. packmule Excel Worksheet Functions 4 February 3rd 05 09:32 PM


All times are GMT +1. The time now is 02:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"