+ Reply to Thread
Results 1 to 5 of 5

Removing characters from a column

Hybrid View

  1. #1
    Registered User
    Join Date
    09-14-2011
    Location
    Manchester, England
    MS-Off Ver
    Excel 2010
    Posts
    5

    Removing characters from a column

    Hi Everyone,

    Is there a way you can remove / limit the number of characters in a column? I get given an excel file from a database program which I need to send to another program for the Bank. The program the Bank uses will only allow 18 characters in column A.

    Is there a way, I can get Excel to look at column A and remove any characters after 18 in column A?

    Many thanks

    Neil

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Removing characters from a column

    hi Neil, welcome to the forum. if you're talking about extracting 18 characters from an existing data, then:
    =LEFT(A1,18)

    if you're talking about preventing users from keying more than 18 characters, try selecting column A (maybe A1:A100), go to Data -> Data Validation -> Allow: custom -> Formula:
    =LEN(A1)<=18
    you can even put an error message in the Data validation window under the "Error Alert" tab

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    09-14-2011
    Location
    Manchester, England
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Removing characters from a column

    Thanks for that, I have tried both those options, but I was lookinmg for something that would remove existing characters in the column and still keep the data in column A.

  4. #4
    Registered User
    Join Date
    12-11-2012
    Location
    Manchester, UK
    MS-Off Ver
    Excel 365
    Posts
    91

    Re: Removing characters from a column

    So, you want to trim any value/string in colum A to 18 characters, but do it in situ as it were? Is that correct?

    Depending on what you want to happen to any columns to the right, you might be able to use "Text to Columns" from the Data menu. Highlight the column then:

    Data>Text to Columns then pick Fixed Width.

    You can then use the scale to pick 18 characters (just click on the correct marker in the scale), hit Next then finish. 18 characters in Colum A, the rest in Column b , which you can delete as you see fit (if you need to do it a lot, record a simple macro to repeat the steps.

    Good luck
    Last edited by TheNewUnion; 12-11-2012 at 11:41 AM. Reason: understanding, slang

  5. #5
    Registered User
    Join Date
    09-14-2011
    Location
    Manchester, England
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Removing characters from a column

    Thats worked many thanks for your help

+ 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