List of file paths in excel. Want to extract the filename from paths, so everything after the LAST “” in...

Can a space-faring robot still function over a billion years?

I can't die. Who am I?

How does signal strength relate to bandwidth?

Why is it "take a leak?"

How does insurance birth control work?

Inconsistent behaviour between dict.values() and dict.keys() equality in Python 3.x and Python 2.7

Reason why dimensional travelling would be restricted

The need of reserving one's ability in job interviews

Is there a way to find out the age of climbing ropes?

Every subset equal to original set?

Lock enemy's y-axis when using Vector3.MoveTowards to follow the player

Is there a limit on the maximum number of future jobs queued in an org?

Being asked to review a paper in conference one has submitted to

Caulking a corner instead of taping with joint compound?

How to mitigate "bandwagon attacking" from players?

Make me a metasequence

Why are special aircraft used for the carriers in the United States Navy?

A bug in Excel? Conditional formatting for marking duplicates also highlights unique value

How to use math.log10 function on whole pandas dataframe

How to fix my table, centering of columns

Why is my Contribution Detail Report (native CiviCRM Core report) not accurate?

3.5% Interest Student Loan or use all of my savings on Tuition?

School performs periodic password audits. Is my password compromised?

Is every open circuit a capacitor?



List of file paths in excel. Want to extract the filename from paths, so everything after the LAST “” in the file path


how do i get a simple IF function to work in Excel only when another cell has a value in it?Extracting Characters from Folder Path in ExcelXNPV Excel function on Mac : not working?Can you apply names in OpenOffice Calc the same way you can in Excel?Excel INDIRECT function referencing cell with variable row from another worksheetExcel2013 - Grabbing data from specific cells based on the selection from a drop down listHow to sum up numbers without the sum functionSelect the last entry by date and type in ExcelIn Excel, Choosing a Word from a ListExcel: Getting the top five values from a row into a comma separated list













0















I've been trying to use a combination of Excel's =RIGHT function with FIND. I guess my thinking is:



Example:



I have "H:NIckPicturesFamdownload.jpg" in cell A1



I would like to then write a formula that would take the end "download.jpg" and drop it into A2.



My thinking so far:




  1. Start looking from the end of the cell text.

  2. When excel runs into the first instance of "" , extract everything up until that point into cell A2.


Am I going about this the right way?










share|improve this question







New contributor




Nicolas Bernal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    0















    I've been trying to use a combination of Excel's =RIGHT function with FIND. I guess my thinking is:



    Example:



    I have "H:NIckPicturesFamdownload.jpg" in cell A1



    I would like to then write a formula that would take the end "download.jpg" and drop it into A2.



    My thinking so far:




    1. Start looking from the end of the cell text.

    2. When excel runs into the first instance of "" , extract everything up until that point into cell A2.


    Am I going about this the right way?










    share|improve this question







    New contributor




    Nicolas Bernal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      I've been trying to use a combination of Excel's =RIGHT function with FIND. I guess my thinking is:



      Example:



      I have "H:NIckPicturesFamdownload.jpg" in cell A1



      I would like to then write a formula that would take the end "download.jpg" and drop it into A2.



      My thinking so far:




      1. Start looking from the end of the cell text.

      2. When excel runs into the first instance of "" , extract everything up until that point into cell A2.


      Am I going about this the right way?










      share|improve this question







      New contributor




      Nicolas Bernal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I've been trying to use a combination of Excel's =RIGHT function with FIND. I guess my thinking is:



      Example:



      I have "H:NIckPicturesFamdownload.jpg" in cell A1



      I would like to then write a formula that would take the end "download.jpg" and drop it into A2.



      My thinking so far:




      1. Start looking from the end of the cell text.

      2. When excel runs into the first instance of "" , extract everything up until that point into cell A2.


      Am I going about this the right way?







      microsoft-excel worksheet-function






      share|improve this question







      New contributor




      Nicolas Bernal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      Nicolas Bernal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      Nicolas Bernal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked yesterday









      Nicolas BernalNicolas Bernal

      31




      31




      New contributor




      Nicolas Bernal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Nicolas Bernal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Nicolas Bernal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          2 Answers
          2






          active

          oldest

          votes


















          1














          Check out this page that does it for URLS.

          It gives a good breakdown and explains the different parts of the formula.

          Just change the character you need to look for to be the back-slash, and it will work for filenames.



          =RIGHT(A1,LEN(A1)-FIND("@",SUBSTITUTE(A1,"","@",LEN(A1)-LEN(SUBSTITUTE(A1,"",""))),1))





          share|improve this answer


























          • Hi, this definitely solves my problem. I'm going to dig into it to understand it more. Thank you for pointing me in the right direction.

            – Nicolas Bernal
            yesterday











          • @BlueGI, probably best to add content to your answer rather than link to external content. Link-only (or almost link-only, like yours) answers are likely to be downvoted and possibly flagged.

            – Alex M
            yesterday



















          0














          As long as you're not using an ancient version of Office, InstrRev makes it simpler to find the last in the file name. It parses the string right to left instead of left to right (as Instr does).



          Try this:



          Sub TestExtract()
          Debug.Print ExtractFilename("H:NickPicturesFamdownload.jpg")
          Debug.Print ExtractFilename("H:Famdownload.jpg")
          Debug.Print ExtractFilename("H:download.jpg")
          Debug.Print ExtractFilename("H:download.jpg")

          End Sub

          Function ExtractFilename(sFullPath As String) As String

          Dim x As Long

          If InStr(sFullPath, "") > 0 Then
          x = InStrRev(sFullPath, "")
          ExtractFilename = Mid$(sFullPath, x + 1)
          Else
          ' Might be a fullpath like C:somefile.xxx
          If InStr(sFullPath, ":") > 0 Then
          x = InStr(sFullPath, ":")
          ExtractFilename = Mid$(sFullPath, x + 1)
          End If
          ' Other oddities? Handle 'em here
          End If

          End Function





          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });






            Nicolas Bernal is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1411502%2flist-of-file-paths-in-excel-want-to-extract-the-filename-from-paths-so-everyth%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            Check out this page that does it for URLS.

            It gives a good breakdown and explains the different parts of the formula.

            Just change the character you need to look for to be the back-slash, and it will work for filenames.



            =RIGHT(A1,LEN(A1)-FIND("@",SUBSTITUTE(A1,"","@",LEN(A1)-LEN(SUBSTITUTE(A1,"",""))),1))





            share|improve this answer


























            • Hi, this definitely solves my problem. I'm going to dig into it to understand it more. Thank you for pointing me in the right direction.

              – Nicolas Bernal
              yesterday











            • @BlueGI, probably best to add content to your answer rather than link to external content. Link-only (or almost link-only, like yours) answers are likely to be downvoted and possibly flagged.

              – Alex M
              yesterday
















            1














            Check out this page that does it for URLS.

            It gives a good breakdown and explains the different parts of the formula.

            Just change the character you need to look for to be the back-slash, and it will work for filenames.



            =RIGHT(A1,LEN(A1)-FIND("@",SUBSTITUTE(A1,"","@",LEN(A1)-LEN(SUBSTITUTE(A1,"",""))),1))





            share|improve this answer


























            • Hi, this definitely solves my problem. I'm going to dig into it to understand it more. Thank you for pointing me in the right direction.

              – Nicolas Bernal
              yesterday











            • @BlueGI, probably best to add content to your answer rather than link to external content. Link-only (or almost link-only, like yours) answers are likely to be downvoted and possibly flagged.

              – Alex M
              yesterday














            1












            1








            1







            Check out this page that does it for URLS.

            It gives a good breakdown and explains the different parts of the formula.

            Just change the character you need to look for to be the back-slash, and it will work for filenames.



            =RIGHT(A1,LEN(A1)-FIND("@",SUBSTITUTE(A1,"","@",LEN(A1)-LEN(SUBSTITUTE(A1,"",""))),1))





            share|improve this answer















            Check out this page that does it for URLS.

            It gives a good breakdown and explains the different parts of the formula.

            Just change the character you need to look for to be the back-slash, and it will work for filenames.



            =RIGHT(A1,LEN(A1)-FIND("@",SUBSTITUTE(A1,"","@",LEN(A1)-LEN(SUBSTITUTE(A1,"",""))),1))






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited yesterday

























            answered yesterday









            BlueGIBlueGI

            2063




            2063













            • Hi, this definitely solves my problem. I'm going to dig into it to understand it more. Thank you for pointing me in the right direction.

              – Nicolas Bernal
              yesterday











            • @BlueGI, probably best to add content to your answer rather than link to external content. Link-only (or almost link-only, like yours) answers are likely to be downvoted and possibly flagged.

              – Alex M
              yesterday



















            • Hi, this definitely solves my problem. I'm going to dig into it to understand it more. Thank you for pointing me in the right direction.

              – Nicolas Bernal
              yesterday











            • @BlueGI, probably best to add content to your answer rather than link to external content. Link-only (or almost link-only, like yours) answers are likely to be downvoted and possibly flagged.

              – Alex M
              yesterday

















            Hi, this definitely solves my problem. I'm going to dig into it to understand it more. Thank you for pointing me in the right direction.

            – Nicolas Bernal
            yesterday





            Hi, this definitely solves my problem. I'm going to dig into it to understand it more. Thank you for pointing me in the right direction.

            – Nicolas Bernal
            yesterday













            @BlueGI, probably best to add content to your answer rather than link to external content. Link-only (or almost link-only, like yours) answers are likely to be downvoted and possibly flagged.

            – Alex M
            yesterday





            @BlueGI, probably best to add content to your answer rather than link to external content. Link-only (or almost link-only, like yours) answers are likely to be downvoted and possibly flagged.

            – Alex M
            yesterday













            0














            As long as you're not using an ancient version of Office, InstrRev makes it simpler to find the last in the file name. It parses the string right to left instead of left to right (as Instr does).



            Try this:



            Sub TestExtract()
            Debug.Print ExtractFilename("H:NickPicturesFamdownload.jpg")
            Debug.Print ExtractFilename("H:Famdownload.jpg")
            Debug.Print ExtractFilename("H:download.jpg")
            Debug.Print ExtractFilename("H:download.jpg")

            End Sub

            Function ExtractFilename(sFullPath As String) As String

            Dim x As Long

            If InStr(sFullPath, "") > 0 Then
            x = InStrRev(sFullPath, "")
            ExtractFilename = Mid$(sFullPath, x + 1)
            Else
            ' Might be a fullpath like C:somefile.xxx
            If InStr(sFullPath, ":") > 0 Then
            x = InStr(sFullPath, ":")
            ExtractFilename = Mid$(sFullPath, x + 1)
            End If
            ' Other oddities? Handle 'em here
            End If

            End Function





            share|improve this answer




























              0














              As long as you're not using an ancient version of Office, InstrRev makes it simpler to find the last in the file name. It parses the string right to left instead of left to right (as Instr does).



              Try this:



              Sub TestExtract()
              Debug.Print ExtractFilename("H:NickPicturesFamdownload.jpg")
              Debug.Print ExtractFilename("H:Famdownload.jpg")
              Debug.Print ExtractFilename("H:download.jpg")
              Debug.Print ExtractFilename("H:download.jpg")

              End Sub

              Function ExtractFilename(sFullPath As String) As String

              Dim x As Long

              If InStr(sFullPath, "") > 0 Then
              x = InStrRev(sFullPath, "")
              ExtractFilename = Mid$(sFullPath, x + 1)
              Else
              ' Might be a fullpath like C:somefile.xxx
              If InStr(sFullPath, ":") > 0 Then
              x = InStr(sFullPath, ":")
              ExtractFilename = Mid$(sFullPath, x + 1)
              End If
              ' Other oddities? Handle 'em here
              End If

              End Function





              share|improve this answer


























                0












                0








                0







                As long as you're not using an ancient version of Office, InstrRev makes it simpler to find the last in the file name. It parses the string right to left instead of left to right (as Instr does).



                Try this:



                Sub TestExtract()
                Debug.Print ExtractFilename("H:NickPicturesFamdownload.jpg")
                Debug.Print ExtractFilename("H:Famdownload.jpg")
                Debug.Print ExtractFilename("H:download.jpg")
                Debug.Print ExtractFilename("H:download.jpg")

                End Sub

                Function ExtractFilename(sFullPath As String) As String

                Dim x As Long

                If InStr(sFullPath, "") > 0 Then
                x = InStrRev(sFullPath, "")
                ExtractFilename = Mid$(sFullPath, x + 1)
                Else
                ' Might be a fullpath like C:somefile.xxx
                If InStr(sFullPath, ":") > 0 Then
                x = InStr(sFullPath, ":")
                ExtractFilename = Mid$(sFullPath, x + 1)
                End If
                ' Other oddities? Handle 'em here
                End If

                End Function





                share|improve this answer













                As long as you're not using an ancient version of Office, InstrRev makes it simpler to find the last in the file name. It parses the string right to left instead of left to right (as Instr does).



                Try this:



                Sub TestExtract()
                Debug.Print ExtractFilename("H:NickPicturesFamdownload.jpg")
                Debug.Print ExtractFilename("H:Famdownload.jpg")
                Debug.Print ExtractFilename("H:download.jpg")
                Debug.Print ExtractFilename("H:download.jpg")

                End Sub

                Function ExtractFilename(sFullPath As String) As String

                Dim x As Long

                If InStr(sFullPath, "") > 0 Then
                x = InStrRev(sFullPath, "")
                ExtractFilename = Mid$(sFullPath, x + 1)
                Else
                ' Might be a fullpath like C:somefile.xxx
                If InStr(sFullPath, ":") > 0 Then
                x = InStr(sFullPath, ":")
                ExtractFilename = Mid$(sFullPath, x + 1)
                End If
                ' Other oddities? Handle 'em here
                End If

                End Function






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered yesterday









                Steve RindsbergSteve Rindsberg

                3,6101913




                3,6101913






















                    Nicolas Bernal is a new contributor. Be nice, and check out our Code of Conduct.










                    draft saved

                    draft discarded


















                    Nicolas Bernal is a new contributor. Be nice, and check out our Code of Conduct.













                    Nicolas Bernal is a new contributor. Be nice, and check out our Code of Conduct.












                    Nicolas Bernal is a new contributor. Be nice, and check out our Code of Conduct.
















                    Thanks for contributing an answer to Super User!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1411502%2flist-of-file-paths-in-excel-want-to-extract-the-filename-from-paths-so-everyth%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Cannot install PyQt5 The Next CEO of Stack OverflowCannot install tcpreplay 3.4.4cannot...

                    Kapp-Putsch Acontecimentos | Outros artigos | Menu de navegação

                    Why did early computer designers eschew integers? The Next CEO of Stack OverflowWhat register...