+ Reply to Thread
Results 1 to 5 of 5

Macro for Selective text to columns £small reward too!

  1. #1
    Registered User
    Join Date
    01-05-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    13

    Macro for Selective text to columns £small reward too!

    I have data in Column O that might read like this:

    Colour: Red, Size: small, Wash: Hot, Material:Cotton, Code:412341, Chest:34, Batch:55
    Material:Poly, Code:9999, Chest:34, Batch:12, Colour: Blue, Size: small, SYSTEM: tts

    In AR, AS, AT, AU, I want to enter some headers and the macro will match the data to the headers (up to the , delimiter) then put everything else in BA & subsequent columns but delimited by ,

    Colour / Material / Code / Batch Column BA onwards ( Everything else seperated into columns by comma delimiter )
    Red Cotton 412341 55 Size: small / Wash: Hot / Chest:34
    Blue Poly 9999 12 Chest:34 / Size: small / SYSTEM: tts

    £30 via paypal to best result!

    Thanks
    Alan

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Macro for Selective text to columns £small reward too!

    It will be good if you attach a sample excel file with a before and after sheet.

    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    01-05-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Macro for Selective text to columns £small reward too!

    Please find attachment. So I want to be able to put the delimiter (a header OR a comma) in row 1 as shown and have the macro break the text down as shown.

    Thanks
    Attached Files Attached Files

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Macro for Selective text to columns £small reward too!

    Do you want the data to be output in that particular order only and in those particular columns?

    Will the delimiter be a comma always or is it subject to change?

  5. #5
    Registered User
    Join Date
    01-05-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Macro for Selective text to columns £small reward too!

    The (end) Delimiter is going to be a comma. I want to be able to change headers to enable different data to be sorted in different orders. I may want colour or description to be first etc.

    Hope that makes sense

    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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