Results 1 to 4 of 4

Alphanumeric string conversion into hexadecimal then report the number of bytes

Threaded View

Talamon Alphanumeric string... 02-20-2014, 01:00 PM
Pete_UK Re: Alphanumeric string... 02-20-2014, 02:41 PM
Talamon Re: Alphanumeric string... 02-24-2014, 02:46 PM
Pete_UK Re: Alphanumeric string... 02-24-2014, 03:38 PM
  1. #1
    Registered User
    Join Date
    02-13-2014
    Location
    Somewhere, Rainbow
    MS-Off Ver
    Excel 2007
    Posts
    20

    Alphanumeric string conversion into hexadecimal then report the number of bytes

    All,

    I am attempting to create a string of alphanumeric characters (anywhere from 1 to 65515 characters), convert that into hexadecimal format, then report the total byte length.

    Here is what I have thus far:

    Input into cell K132
    Output in cell J132 =DEC2HEX(CODE(MID(K132,1,1)))&DEC2HEX(CODE(MID(K132,2,1)))&DEC2HEX(CODE(MID(K132,3,1)))&DEC2HEX(CODE(MID(K132,4,1)))&DEC2HEX(CODE(MID(K132,5,1)))&DEC2HEX(CODE(MID(K132,6,1)))&DEC2HEX(CODE(MID(K132,7,1)))&DEC2HEX(CODE(MID(K132,8,1)))&DEC2HEX(CODE(MID(K132,9,1)))&DEC2HEX(CODE(MID(K132,10,1)))

    I don't really think that this method would be good for 65515 bytes (plus I think excel has a maximum limitation on logic arguments). If I continue this method, I would have to set the maximum byte size per row (thereby forcing a set limit, then setting any unused characters to spaces or hex 0x20).

    There must be an easier way of converting a string of alphanumeric characters without having to break it up into 10-character pieces...any thoughts?

    Respectfully,
    Talamon
    Last edited by Talamon; 02-24-2014 at 05:29 PM. Reason: Problem fixed.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 11-27-2013, 10:52 AM
  2. Replies: 12
    Last Post: 03-20-2013, 05:46 PM
  3. How do I extract a number from an alphanumeric string?
    By paulh09 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-16-2012, 09:44 AM
  4. Extract number from alphanumeric string
    By shiner99 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-16-2008, 03:30 PM
  5. Hexadecimal to Binary Conversion
    By sean_f in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-04-2006, 04:05 PM

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