+ Reply to Thread
Results 1 to 4 of 4

Convert text to hex

  1. #1
    Don
    Guest

    Convert text to hex

    Hi All,

    A seemingly simple but none the less frustrating one...


    The task:

    Split up a string of chars into columns - easy MID(,,)

    Convert text one of the resultant columns into hex data which can then be
    converted to decimal - easy NOT ( apparently )

    The hex to decimal bit is easy but I can't find out how to convert the hex "text
    string" to a hex "number" to feed to HEX2DEC.

    This was to be a two second job & now hours of scouring the net have produced
    nada. Any help greatly appreciated.

    Cheers

    Don

  2. #2
    Don
    Guest

    Re: Convert text to hex - issue

    In the great tradition of looking for hours only to work out the the answer 10
    secs after the send button is pressed...

    The problem is the size of the hex number. ie. 2^14. We will do a further split
    prior to the convert.

    Any simple way of telling Excel to convert as unsigned?

    Cheers

    Don

    Don wrote:
    > Hi All,
    >
    > A seemingly simple but none the less frustrating one...
    >
    >
    > The task:
    >
    > Split up a string of chars into columns - easy MID(,,)
    >
    > Convert text one of the resultant columns into hex data which can then
    > be converted to decimal - easy NOT ( apparently )
    >
    > The hex to decimal bit is easy but I can't find out how to convert the
    > hex "text string" to a hex "number" to feed to HEX2DEC.
    >
    > This was to be a two second job & now hours of scouring the net have
    > produced nada. Any help greatly appreciated.
    >
    > Cheers
    >
    > Don


  3. #3
    Niek Otten
    Guest

    Re: Convert text to hex

    You don't have to. From Help:
    =HEX2DEC("A5") Converts hexadecimal A5 to decimal (165)

    --
    Kind regards,

    Niek Otten

    "Don" <[email protected]> wrote in message
    news:438f7082$0$496$61c65585@uq-127creek-reader-03.brisbane.pipenetworks.com.au...
    > Hi All,
    >
    > A seemingly simple but none the less frustrating one...
    >
    >
    > The task:
    >
    > Split up a string of chars into columns - easy MID(,,)
    >
    > Convert text one of the resultant columns into hex data which can then be
    > converted to decimal - easy NOT ( apparently )
    >
    > The hex to decimal bit is easy but I can't find out how to convert the hex
    > "text string" to a hex "number" to feed to HEX2DEC.
    >
    > This was to be a two second job & now hours of scouring the net have
    > produced nada. Any help greatly appreciated.
    >
    > Cheers
    >
    > Don




  4. #4
    Don
    Guest

    Re: Convert text to hex - trap for young players

    Found it... At risk of stating the now obvious ;-)


    ColA - <23:14:18> 24000FD1 - The input string from the uart
    ColC - =MID(A1,11,10) - pick out the variable length hex string

    - the hex string isn't a fixed length & mid must attach nulls or spaces to it

    ColD - =HEX2DEC(C1)

    And so the number conversion barfs


    Changed to ...

    ColC - =TRIM(MID(A1,11,15))
    ColD - =HEX2DEC(C1)

    Happy campers!

    Cheers

    Don


    Niek Otten wrote:
    > You don't have to. From Help:
    > =HEX2DEC("A5") Converts hexadecimal A5 to decimal (165)
    >


    In the great tradition of looking for hours only to work out the the answer 10
    secs after the send button is pressed...

    The problem is the size of the hex number. ie. 214. We will do a further split
    prior to the convert.

    Any simple way of telling Excel to convert as unsigned?

    Cheers

    Don

    Don wrote:

    > Hi All,
    >
    > A seemingly simple but none the less frustrating one...
    >
    >
    > The task:
    >
    > Split up a string of chars into columns - easy MID(,,)
    >
    > Convert text one of the resultant columns into hex data which can then be

    converted to decimal - easy NOT ( apparently )
    >
    > The hex to decimal bit is easy but I can't find out how to convert the hex

    "text string" to a hex "number" to feed to HEX2DEC.
    >
    > This was to be a two second job & now hours of scouring the net have produced

    nada. Any help greatly appreciated.
    >
    > Cheers
    >
    > Don


+ 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