+ Reply to Thread
Results 1 to 7 of 7

VBA Code to Find Specified text within a Column and perform Text to Column

  1. #1
    Registered User
    Join Date
    12-03-2012
    Location
    New Castle, DE
    MS-Off Ver
    Excel 2007
    Posts
    61

    VBA Code to Find Specified text within a Column and perform Text to Column

    Hello,

    I have another code that I will need to create and I am not sure if it even is possible.

    I don't have the code created yet as I do not know how to start it.

    I have data that has all information in one column and I need to do a text to column in order to split the data into its own columns. The dilema I have is that from the copied data I only need to do the text to column on specific cells.

    The data is:
    BANK* 106** ***BANK*ACCOUNT* 11*
    * *
    *TRAN*******MICR*********CHECK**************CHECK********ERROR*DESCRIPTION *
    *CODE*****CHECK*NO********DATE**************AMOUNT *
    *____*****________*******_____**************______*******_________________ *
    ***0******0000001******04/25/13***************49.00*****CHECK*NOT*ON*BANK*RECON*FILE *
    ***0******30000002******04/25/13***************12.00*****CHECK*NOT*ON*BANK*RECON*FILE *
    ***0******30000003******04/25/13****************5.00*****CHECK*NOT*ON*BANK*RECON*FILE *
    ***0******30000004******01/24/13***************40.00*****CHECK*NOT*ON*BANK*RECON*FILE *
    ***0******30000005******02/15/13***************46.00*****CHECK*CANCELLED*PREVIOUSLY *
    ***0******30000006******02/18/13***************13.00*****CHECK*AMOUNT*INCONSISTENT*WITH*BANK*RECON,********17.00 *
    ***0******30000007******02/25/13***************25.00*****CHECK*NOT*ON*BANK*RECON*FILE *
    ***0******30000008******04/09/13****************5.00*****CHECK*AMOUNT*INCONSISTENT*WITH*BANK*RECON,********86.00 *
    ***0******30000009******04/09/13***************41.00*****CHECK*NOT*ON*BANK*RECON*FILE *
    ***0******30000010******04/09/13***************31.50*****CHECK*AMOUNT*INCONSISTENT*WITH*BANK*RECON,********26.00 * * *
    TOTAL*REJECTED * * *
    **COUNT**********11******AMOUNT***********279.50 *
    * *
    TOTAL*ACCEPTED *
    * *
    **COUNT*******3,289******AMOUNT*******168,199.91 *


    The above data is all in column A. I want a code that will do a search for cells that start with 0. Once it finds the cells the start with 0, it should then perform a text to column on those cells.

    The code that I do have is for the text to colum, which is (where ?? is, that is where the cell with 0 is).

    Please Login or Register  to view this content.
    If this is not possible to do, please let me know what other options I have.


    Thank you,
    ~Miriam

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA Code to Find Specified text within a Column and perform Text to Column

    Are the asterisks truly asterisks or do they represent spaces in your sample.

  3. #3
    Registered User
    Join Date
    12-03-2012
    Location
    New Castle, DE
    MS-Off Ver
    Excel 2007
    Posts
    61

    Re: VBA Code to Find Specified text within a Column and perform Text to Column

    They represent spaces

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA Code to Find Specified text within a Column and perform Text to Column

    Maybe:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    12-03-2012
    Location
    New Castle, DE
    MS-Off Ver
    Excel 2007
    Posts
    61

    Re: VBA Code to Find Specified text within a Column and perform Text to Column

    John, I just tried your code and it's not doing anything at all. What am I doing wrong?


    Thank you,
    ~Miriam

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA Code to Find Specified text within a Column and perform Text to Column

    Maybe:

    Please Login or Register  to view this content.

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA Code to Find Specified text within a Column and perform Text to Column

    Quote Originally Posted by MHamid View Post
    John, I just tried your code and it's not doing anything at all. What am I doing wrong?


    Thank you,
    ~Miriam
    Can you provide a sample with a true depiction of your data. The asterisk is a special character and it's hard to test with.

+ 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