Trim PART of a Path.

  • Hi Guys,


    Anyone have a function/macro/formula to give me part of a path. So if my path was /C:/Mydocuments/Ozgrid/Friday/IloveOZ.txt , I would want it to get me /Ozgrid/Friday/IloveOZ.txt. I found formulas to get the end and beggining but not here and that is customizable.


    I want to TRIM part of the path, not necessarily till the last "/" maybe the 3rd or 4th. Anyone have anything custom for this?


    Thanks.

  • Re: Trim PART of a Path.


    If the full path is in A1, and the instance of / to start from is defined as a number in A2, try:


    =RIGHT(A1,LEN(A1)-FIND("|",SUBSTITUTE(A1,"/","|",A2))+1)

    [COLOR="Purple"]Regards,[/COLOR]
    [COLOR="Purple"]Batman.[/COLOR]

Participate now!

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