+ Reply to Thread
Results 1 to 7 of 7

Separating Binary Numbers via "Text to Columns" Type Approach

  1. #1
    Registered User
    Join Date
    04-08-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    76

    Separating Binary Numbers via "Text to Columns" Type Approach

    I have extremely long sets of binary 1s and 0s in cells in Column B of my spreadsheet, and I need to separate each digit into its own column, starting with Column B. I have looked at the Text to Columns function and have searched and searched Google, but I can't find anything that will separate after one digit/character. Can anyone provide me with VBA code to do this? Just a code that does what Text to Columns does but with each digit separated. Thanks in advance for your help! Please see the sample file for clarification, if needed.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor StevenM's Avatar
    Join Date
    03-23-2008
    Location
    New Lenox, IL USA
    MS-Off Ver
    2007
    Posts
    910

    Re: Separating Binary Numbers via "Text to Columns" Type Approach

    Perhaps there is a better way, but this should work.

    Please Login or Register  to view this content.
    You wrote "column B" in your message, but your workbook showed column A. For column B, you would need to change "A" to "B" and the line "Cells(nRow, nCol) = ..." would need to be "Cells(nRow, nCol + 1) = ..."

  3. #3
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,523

    Re: Separating Binary Numbers via "Text to Columns" Type Approach

    Hi JP777,

    Try this:

    Please Login or Register  to view this content.
    HTH

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Separating Binary Numbers via "Text to Columns" Type Approach

    TextToColumns
    Please Login or Register  to view this content.
    Last edited by jindon; 04-21-2012 at 10:50 PM.

  5. #5
    Registered User
    Join Date
    04-08-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    76

    Re: Separating Binary Numbers via "Text to Columns" Type Approach

    Thanks to all 3 of you. All 3 worked like a charm!

  6. #6
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,523

    Re: Separating Binary Numbers via "Text to Columns" Type Approach

    Thanks for the feedback and we're glad to hear it

  7. #7
    Valued Forum Contributor
    Join Date
    10-15-2007
    Location
    Home
    MS-Off Ver
    Office 2010, W10
    Posts
    373

    Re: Separating Binary Numbers via "Text to Columns" Type Approach

    Hi

    A bit late, but another option


    Please Login or Register  to view this content.

+ 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