+ Reply to Thread
Results 1 to 8 of 8

Trimming!

  1. #1
    Registered User
    Join Date
    10-02-2008
    Location
    london
    Posts
    7

    Trimming!

    Hi,

    I have just imported alot of data into excel which i was wondering if theres a way of trimming

    theres a column where all the cell values end in ".GB" or ".ES" basically a "." then 2 letters. Is there a formula to trim this off?

    Thanks so much
    Last edited by jonnykanzen; 10-02-2008 at 06:31 AM.

  2. #2
    Registered User
    Join Date
    10-02-2008
    Location
    london
    Posts
    7
    Sorry forgot to mention.

    Not ALL the cells end like this. . . Some dont have the ".XX" at the end and obviously i wouldnt want t his trimmed

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,457
    In a spare column you could use the formula

    =IF(LEFT(RIGHT(A1,3),1)=".",LEFT(A1,LEN(A1)-2),A1)

    This leaves the fullstop in. If you want that removed use -3 instead of -2


    Once your happen you can use copy / pastespecial / values
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    10-02-2008
    Location
    london
    Posts
    7
    hi there thanks for your help.

    thats works nicely for all the cells that end it .XX but the ones that dont it produces a 0. . anyway to make this work?

    heres an eg of my cells:
    AOEP
    AFE.GB
    AGA.GB
    AGK.GB
    AGAP.GB
    AGRI
    AHMP

    thanks

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,457
    For me your test data returns

    AOEP
    AFE.
    AGA.
    AGK.
    AGAP.
    AGRI
    AHMP

  6. #6
    Registered User
    Join Date
    10-02-2008
    Location
    london
    Posts
    7
    returns for me:
    0
    AFE
    AGA
    AGK
    AGAP
    0
    0

  7. #7
    Registered User
    Join Date
    10-02-2008
    Location
    london
    Posts
    7

    Smile

    Ok fixed it!

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,457
    what did you do to fix it, in case anybody else reading this has the same problem.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Trimming with if statement
    By Portuga in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-13-2008, 03:30 PM
  2. [SOLVED] Compressing data or Trimming Blank Rows
    By all4excel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-07-2008, 07:28 AM
  3. Trimming Spaces before and after
    By maurices5000 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-09-2008, 04:48 PM
  4. Trimming data
    By StevenAFC in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-02-2007, 12:12 PM
  5. Trimming text
    By DistantHoller in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-07-2007, 05:01 PM

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