+ Reply to Thread
Results 1 to 5 of 5

Is there a cell format for HEX numbers?

  1. #1
    Betty
    Guest

    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. #2
    Bill Martin -- (Remove NOSPAM from address)
    Guest

    Re: Is there a cell format for HEX numbers?

    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. #3
    Dave O
    Guest

    Re: Is there a cell format for HEX numbers?

    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. #4
    Bill Martin -- (Remove NOSPAM from address)
    Guest

    Re: Is there a cell format for HEX numbers?

    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. #5
    Betty
    Guest

    Re: Is there a cell format for HEX numbers?

    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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1