I am trying to parse a string which is made up of hexadecimal characters. I'm parsing using the Mid() function in Excel 2010. The string looks something like this from left to right: :10C010006C6C7920676F207468726F756768206137 . It is the .hex file format. Character 2 and 3 represent the length of data in hex. So in the example the 10 is really 16 decimal (0x10 = 16 decimal). Characters C010006 for me aren't important. Characters 6C 6C 79 20 67 6F 20 74 68 72 6F 75 67 68 20 61 (spaced placed to break up the data) are the characters I care about. Every 2 numbers represent a hexadecimal byte. In my example the first number in decimal = 16, so I need to place 16 pairs of data into 16 cells side-by-side and then place the last 2 character pair in the last cell on the right. Where it gets difficult, the first number can be any even number from 2 to 16 (2-32 characters). I would like to put the last two pairs in the last cell on the right. this last column will always have the last two numbers. If the first number is 08 then there will be 8 pairs starting in position 10 followed by a single pair. if the first number is 02, then starting in character 10 there will only be one data pair and 1 end of string pair. I would like to do this without VBA, but if that is not possible I will conform. I'm trying to create a parser which will check for mistakes or other problems which can be averted prior to releasing. any help would be great. Thanks.
Tony
Bookmarks