remove Last Character If "/" ; In A Whole Datasheet

  • Hi,


    we have to transfer datasheets into another program, but just turned
    out that several thousands of lines has / sign in the end of the lines
    (my mistake). In order to be transferred correctly, this has to be
    removed. How can I solve this problem?


    Replace is not an option because in every line there are almost 50 /
    sign ...
    I only need to remove the last / in every line.


    So I would need a VBA script to remove the last character only if this
    a / sign .
    Any help is appreciated! Thx!


    LT

  • Re: remove Last Character If "/" ; In A Whole Datasheet


    You could use a formula on each line... assuming the string is in A1...


    =IF(RIGHT(TRIM(A1),1)="/",LEFT(A1,LEN(A1)-1),A1)


    Copy down as required.


    Let me know if you MUST have VBA...


    Ger

    _______________________________________________
    There are 10 types of people in the world. Those that understand Binary and those that dont. :P


    Why are Halloween and Christmas the same? Because Oct 31 = Dec 25... ;)

    _______________________________________________

  • Re: remove Last Character If "/" ; In A Whole Table


    Sorry for the misleading names, this is an access table, not excel sheet.


    LT

  • Re: remove Last Character If "/" ; In A Whole Datasheet


    No Apology needed. It was my mistake, I should have realised that this was posted in the Access Help section. Duh! Sorry mate. :(

    _______________________________________________
    There are 10 types of people in the world. Those that understand Binary and those that dont. :P


    Why are Halloween and Christmas the same? Because Oct 31 = Dec 25... ;)

    _______________________________________________

  • Re: remove Last Character If "/" ; In A Whole Datasheet


    Hi


    when you say line do you mean record, and is it the last "/" in the last field of that record you wish to delete?


    Robert

  • Re: remove Last Character If "/" ; In A Whole Datasheet


    Yes, I meant records. And the / are in the end of a certain field.


    LT

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!