+ Reply to Thread
Results 1 to 4 of 4

Text to columns macro (fixed width) w/ predefined format on result

  1. #1
    Registered User
    Join Date
    05-16-2009
    Location
    Bangkok
    MS-Off Ver
    Excel 2007/2010
    Posts
    12

    Text to columns macro (fixed width) w/ predefined format on result

    Hi,

    I am searching for fixed width-text to column macro and found a reply in the forum. However, when I apply the macro, the result of zeros in front of figures disappear since the format of value in splitted column doesn't predefined as text

    e.g. sample text to split to column:
    000122042009ABCDEFG00567

    Required result:
    0001|22042009|ABCDEFG|00567


    when running below macro; result shows:
    1|22042009|ABCDEFG|567
    (Beginning zeros figures of the first and last column disappear)


    Applied Macro:
    Please Login or Register  to view this content.

    Would anyone please help modify the macro to define result in some columns as text format?

    Note: I can only apply "ready to use" macro (Excel 2003) but not keen on writing one... pls kindly help!

    Many thanks
    DT.
    Last edited by dusit_t; 05-21-2009 at 11:06 AM. Reason: enter [code] tag for macro section

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Text to columns macro (fixed width) w/ predefined format on result

    Hi dusit, welcome to the forum.

    First, you'll need to go back to that first post, EDIT, GO ADVANCED (if necessary), highlight all the macro code and click on the # icon to wrap the code in [ code ] tags. It's highly valued forum rule / requirement.

    Then, your post will be simple to read like this corrected macro code I offer here to resolve your issue:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    05-16-2009
    Location
    Bangkok
    MS-Off Ver
    Excel 2007/2010
    Posts
    12

    Re: Text to columns macro (fixed width) w/ predefined format on result

    Hi JBeaucaire,

    Thank you so much for both informing the rule & offering help on the macro.
    I have already edited the first post & definitely do it right next time!

    DT.

  4. #4
    Registered User
    Join Date
    05-16-2009
    Location
    Bangkok
    MS-Off Ver
    Excel 2007/2010
    Posts
    12

    Re: Text to columns macro (fixed width) w/ predefined format on result

    posting in error
    Last edited by dusit_t; 05-19-2009 at 11:27 AM.

+ 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