+ Reply to Thread
Results 1 to 7 of 7

VBA Macro to decode a string into specific format

  1. #1
    Registered User
    Join Date
    09-04-2007
    Posts
    15

    VBA Macro to decode a string into specific format

    I have a very large set of infrared codes that were used on a Philips pronto remote, i would like to be able to convert these codes into a different format. There are around 8K rows of data

    The pronto code is placed in column "E" and the resultant converted result appears in "G,H,I, J" where G is the device 1 command, H is the device 2 command only applicable when the sting is a 20 bit, I is the actual command and J is the number of bits in the string.

    The enclosed worksheet is how i managed to decode them, but would like to create a macro that would decode the pronto string and give me the 4 required outputs.
    This will allow me to convert all the codes i have, which will allow me to then convert them into another format which i know how to use.
    I have tried creating macros but i just don't know what i am doing

    Any help appreciated
    Attached Files Attached Files

  2. #2
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: VBA Macro to decode a string into specific format

    Maybe :

    Please Login or Register  to view this content.
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  3. #3
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: VBA Macro to decode a string into specific format

    You could use also this code:
    Please Login or Register  to view this content.
    Regards,
    Antonio

  4. #4
    Registered User
    Join Date
    09-04-2007
    Posts
    15

    Re: VBA Macro to decode a string into specific format

    Thanks Karedog,
    That works fine, however if a row has null data in "E" how would the output rows display nothing instead of 0, 0, 0, -1?

  5. #5
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: VBA Macro to decode a string into specific format

    You are welcome.

    Please Login or Register  to view this content.
    Don't forget to mark this thread as solved, thanks.

  6. #6
    Registered User
    Join Date
    09-04-2007
    Posts
    15

    Re: VBA Macro to decode a string into specific format

    Many thanks to you both for your assistance

  7. #7
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: VBA Macro to decode a string into specific format

    You are welcome, glad to help.


    Regards

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Tool to lookup policy numbers when given a string to decode - improve
    By Caraway_d in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-15-2016, 07:08 PM
  2. Tool to lookup policy numbers when given a string to decode
    By Caraway_d in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-11-2016, 08:03 PM
  3. [SOLVED] Macro to change 1) part of string, 2) the order of characters inside a string, 3) format
    By Karl Gustaf Karsten in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-16-2015, 11:51 AM
  4. [SOLVED] Macro to create a new line within a text string if specific characters appear mid-string
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-29-2014, 11:32 AM
  5. Encode/Decode a byte array to/from Base64 format
    By jeff_123 in forum Excel General
    Replies: 1
    Last Post: 05-31-2014, 04:54 AM
  6. [SOLVED] Replace string with another string from another worksheet (like decode)
    By sugee in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-27-2013, 02:05 AM
  7. [SOLVED] Macro to convert specific text and format specific text within a string
    By Mencae in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-06-2012, 12:13 AM

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