+ Reply to Thread
Results 1 to 7 of 7

Change all the values in column A to 30 charectors in length

  1. #1
    Forum Contributor
    Join Date
    03-28-2008
    Location
    India, bangalore
    MS-Off Ver
    Excel 2003,2007
    Posts
    216

    Change all the values in column A to 30 charectors in length

    Hi,

    I have some values in Column A I want to change all the values to 25 charectors in length:
    eg: Aravindhan_Jyaramantest_test_test should be changed to Aravindhan_Jyaramantest_


    Thanks in advance for your help.
    Arvind

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Change all the values in column A to 30 charectors in length

    =Left(A1,25) will cut the string in A1 to 25 chars...

    You can apply formula and copy down

    Then copy the new column and paste speciall >> values over the original.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    05-20-2009
    Location
    NY
    MS-Off Ver
    Excel 2003
    Posts
    57

    Re: Change all the values in column A to 30 charectors in length

    If data is in cell A1, then in another cell, type:
    Please Login or Register  to view this content.
    and that should get you from Aravindhan_Jyaramantest_test_test to Aravindhan_Jyaramantest_t

  4. #4
    Forum Contributor
    Join Date
    03-28-2008
    Location
    India, bangalore
    MS-Off Ver
    Excel 2003,2007
    Posts
    216

    Re: Change all the values in column A to 30 charectors in length

    Hi,

    Thanks for your reply, I knew this formula, and I cannot insert any more columns to type the formula. so I need this in a macro to convert the values in column A itselt.

    Thanks once again.
    Arvind

  5. #5
    Registered User
    Join Date
    05-20-2009
    Location
    NY
    MS-Off Ver
    Excel 2003
    Posts
    57

    Re: Change all the values in column A to 30 charectors in length

    Hi Arvind,

    Try the following:
    Please Login or Register  to view this content.
    This will determine how many rows you have containing data, then truncate chars down to 25. Let me know if you have any further questions. If solved, please mark this thread as solved, thanks!

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Change all the values in column A to 30 charectors in length

    Rather than looping use Evaluate

    Please Login or Register  to view this content.
    Last edited by DonkeyOte; 06-30-2009 at 04:06 AM. Reason: typos!

  7. #7
    Forum Contributor
    Join Date
    03-28-2008
    Location
    India, bangalore
    MS-Off Ver
    Excel 2003,2007
    Posts
    216

    Re: Change all the values in column A to 30 charectors in length

    Hi Guyes

    Both the code worked for me and thanks for your help:

    In the mean time I recorded a macro by selecting the column A, text to column> fixed width> pointed at 30 and the selected the next portion and marked as Do not import & finallty stoped the macro.

    Its working for me

    Thanks once again guyes.

+ 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