+ Reply to Thread
Results 1 to 3 of 3

Code which deletes all signs behind a number of signs

Hybrid View

  1. #1
    Registered User
    Join Date
    08-25-2009
    Location
    krakow, Poland
    MS-Off Ver
    Excel 2003
    Posts
    16

    Code which deletes all signs behind a number of signs

    Dear All,
    Could you please help me in writing the code that will delete all signs following first 18 signs:

    I have a column of text rows:

    sadjnsjkhfjsdfhadfagagghgh\
    fgdagshs hgjzfgaf nghhhf


    I need a macro which will change the above text into an 18 signs long text:

    sadjnsjkhfjsdfhadf
    fgdagshs hgjzfgaf


    I would really appreciate your help.
    Thank you in advance.

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

    Re: Code which deletes all signs behind a number of signs

    In terms of formulae see LEFT function

    =LEFT(A1;18)
    copied down

    where A1 holds original

    If you need to overwrite the original data values then see the Data -> Text to Columns Feature - use Fixed With and set split to 18 (in Step 3 if preferred you may choose not to Import the 2nd column (skip))

  3. #3
    Registered User
    Join Date
    08-25-2009
    Location
    krakow, Poland
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Code which deletes all signs behind a number of signs

    Thanks a lot!
    Last edited by Mula; 09-30-2009 at 06:02 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