+ Reply to Thread
Results 1 to 10 of 10

Pulling just the filename

  1. #1
    Cardinal
    Guest

    Pulling just the filename

    I have a column in my spreadsheet that has a bunch of image names and
    paths. Example: images/taapay-040.gif

    Is there a way that I can pull out just the filename? This would make
    things so much easier for me and save me a ton of editing. Thank you
    very much.


  2. #2
    Bob Phillips
    Guest

    Re: Pulling just the filename

    =MID(A1,FIND("/",A1,LEN(A1)-LEN(SUBSTITUTE(A1,"/","")))+1,255)

    --

    HTH

    Bob Phillips

    (replace xxxx in the email address with gmail if mailing direct)

    "Cardinal" <[email protected]> wrote in message
    news:[email protected]...
    > I have a column in my spreadsheet that has a bunch of image names and
    > paths. Example: images/taapay-040.gif
    >
    > Is there a way that I can pull out just the filename? This would make
    > things so much easier for me and save me a ton of editing. Thank you
    > very much.
    >




  3. #3
    CLR
    Guest

    RE: Pulling just the filename

    =MID(A1,FIND("/",A1,1)+1,99)

    Vaya con Dios,
    Chuck, CABGx3



    "Cardinal" wrote:

    > I have a column in my spreadsheet that has a bunch of image names and
    > paths. Example: images/taapay-040.gif
    >
    > Is there a way that I can pull out just the filename? This would make
    > things so much easier for me and save me a ton of editing. Thank you
    > very much.
    >
    >


  4. #4
    Cardinal
    Guest

    Re: Pulling just the filename

    Oh boy, my fault - please forgive me. Your function worked perfectly
    although I now realize that I left out one important item. Not all the
    paths are the same. They might one level or several levels deep. All of
    these are possibilites:

    images/taasec-004.gif
    data/images/taasec-004.gif

    Thanks and sorry for forgetting this in my original post.


  5. #5
    CLR
    Guest

    RE: Pulling just the filename

    Or this.......

    =MID(A1,FIND("s/",A1,1)+2,99)

    Vaya con Dios,
    Chuck, CABGx3



    "CLR" wrote:

    > =MID(A1,FIND("/",A1,1)+1,99)
    >
    > Vaya con Dios,
    > Chuck, CABGx3
    >
    >
    >
    > "Cardinal" wrote:
    >
    > > I have a column in my spreadsheet that has a bunch of image names and
    > > paths. Example: images/taapay-040.gif
    > >
    > > Is there a way that I can pull out just the filename? This would make
    > > things so much easier for me and save me a ton of editing. Thank you
    > > very much.
    > >
    > >


  6. #6
    Gord Dibben
    Guest

    Re: Pulling just the filename

    If the hyphen is common to all, try Data>Text to Columns with the hyphen as
    delimiter.


    Gord Dibben MS Excel MVP

    On 30 Jun 2006 10:59:15 -0700, "Cardinal" <[email protected]> wrote:

    >Oh boy, my fault - please forgive me. Your function worked perfectly
    >although I now realize that I left out one important item. Not all the
    >paths are the same. They might one level or several levels deep. All of
    >these are possibilites:
    >
    >images/taasec-004.gif
    >data/images/taasec-004.gif
    >
    >Thanks and sorry for forgetting this in my original post.



  7. #7
    Bob Phillips
    Guest

    Re: Pulling just the filename

    =MID(A1,FIND("~",SUBSTITUTE(A1,"/","~",LEN(A1)-LEN(SUBSTITUTE(A1,"/",""))))+
    1,255)

    --

    HTH

    Bob Phillips

    (replace xxxx in the email address with gmail if mailing direct)

    "Cardinal" <[email protected]> wrote in message
    news:[email protected]...
    > Oh boy, my fault - please forgive me. Your function worked perfectly
    > although I now realize that I left out one important item. Not all the
    > paths are the same. They might one level or several levels deep. All of
    > these are possibilites:
    >
    > images/taasec-004.gif
    > data/images/taasec-004.gif
    >
    > Thanks and sorry for forgetting this in my original post.
    >




  8. #8
    Ron Rosenfeld
    Guest

    Re: Pulling just the filename

    On 30 Jun 2006 10:21:55 -0700, "Cardinal" <[email protected]> wrote:

    >I have a column in my spreadsheet that has a bunch of image names and
    >paths. Example: images/taapay-040.gif
    >
    >Is there a way that I can pull out just the filename? This would make
    >things so much easier for me and save me a ton of editing. Thank you
    >very much.


    Download and install Longre's free morefunc.xll add-in from
    http://xcell05.free.fr/

    Then use the formula:

    =REGEX.MID(A1,"(?<=/)[^/]+$")

    to return the last string that follows a "/"
    --ron

  9. #9
    Harlan Grove
    Guest

    Re: Pulling just the filename

    Ron Rosenfeld wrote...
    ....
    >Then use the formula:
    >
    >=REGEX.MID(A1,"(?<=/)[^/]+$")
    >
    >to return the last string that follows a "/"


    You don't need the assertion. The following is sufficient.

    =REGEX.MID(A1,"[^/]+$")


  10. #10
    Ron Rosenfeld
    Guest

    Re: Pulling just the filename

    On 1 Jul 2006 15:13:20 -0700, "Harlan Grove" <[email protected]> wrote:

    >Ron Rosenfeld wrote...
    >...
    >>Then use the formula:
    >>
    >>=REGEX.MID(A1,"(?<=/)[^/]+$")
    >>
    >>to return the last string that follows a "/"

    >
    >You don't need the assertion. The following is sufficient.
    >
    >=REGEX.MID(A1,"[^/]+$")


    Thanks.
    --ron

+ 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