Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2007
    Posts
    127

    Unanswered: Delete all records after "/"

    I've been asked to remove all the character that appear after the following sign "/"

    So "D600/1" Should become "D600" and "D241/5" should become "D241"

    So i thought my formula would look something like this

    =IF(A2, "/", then LEFT(A2, 4) ELSE, A2)

    will this work

    please see attached excel for example
    Attached Files Attached Files

  2. #2
    Join Date
    May 2009
    Posts
    258
    Hello,

    You can use the following formula:
    Code:
    =IF(ISERROR(FIND("/",A2)),A2,LEFT(A2,FIND("/",A2)-1))
    Regards,

    Ax

  3. #3
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    511
    Hi akhlaq768,
    So i thought my formula would look something like this

    =IF(A2, "/", then LEFT(A2, 4) ELSE, A2)
    That formula's not quite right... it's a bit of a formula / VB combination!

    I can't download your attachment - the zip file seems to be corrupted - but I think a formula that would suit you is this:
    Code:
    =LEFT(A2,SEARCH("/",A2&"/")-1)

    Alternatively, if you don't want to keep the original data and just want to remove the unwanted characters in situ, then the Text To Columns feature would be a quick and easy option.
    Select the range > Data > Text To Columns > Delimited > Other = / > Select the 2nd column in the data preview pane and choose Do Not Import > Finish.


    Hope that helps...

  4. #4
    Join Date
    Oct 2007
    Posts
    127
    thanks guys this is perfect

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •