+ Reply to Thread
Results 1 to 22 of 22

File Path Length Excel

  1. #1
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,719

    File Path Length Excel

    Hello,
    How can I check to see how length my file is in excel? What key do I need to press?

    Also, how can I fix or shorten it so I won’t have any problem or losing the file. This has been happening lately in some of my file.
    Thank you.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: File Path Length Excel

    If the name of the file is in A1 you can use in b1 = LEN(A1)
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,719

    Re: File Path Length Excel

    Hi
    I placed the code in A1 … this code "b1 = LEN(A1)"
    but it does not do anything. It did not show the length of the code.

    Thanks.

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: File Path Length Excel

    is the name of the file in cell A1.

    If so you can extract the length of cell A1 (the name of the file) in cel B1 with the formula.

    in cell B1 = LEN(A1)

  5. #5
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,719

    Re: File Path Length Excel

    I think I should say its the workbooks name.

    Let say the name of the workbook is Book1.

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: File Path Length Excel

    with the formula in cell B1 the result wil be 5

    is suppose the dot is not in the name of the file.

  7. #7
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,719

    Re: File Path Length Excel

    Hello

    Ok U need a formula that will total the length of the file name. The file name that includes the path the leading to the other folder.


    Thanks

  8. #8
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,719

    Re: File Path Length Excel

    *I need the formula

    Thanks

  9. #9
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: File Path Length Excel

    Try

    =MID(CELL("filename"),SEARCH("[",CELL("filename"))+1, SEARCH("]",CELL("filename"))-SEARCH("[",CELL("filename"))-1)

    For file name and

    =LEN(MID(CELL("filename"),SEARCH("[",CELL("filename"))+1, SEARCH("]",CELL("filename"))-SEARCH("[",CELL("filename"))-1))

    For its length

  10. #10
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,719

    Re: File Path Length Excel

    Do i place this formula in a new worksheet in any cells?

    Thanks

  11. #11
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: File Path Length Excel

    Yes, although the formula may not work for your version of Excel. I hope it does

  12. #12
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,719

    Re: File Path Length Excel

    Hi
    I tried to put the code but get a #value result.

    See attachment.
    Attached Files Attached Files

  13. #13
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: File Path Length Excel

    Please Login or Register  to view this content.
    and
    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    RJ1969
    the full path limitation is 260 characters but for excel with links it must be less because of 31 for sheet name , extra spec symbols such as []'' and range address.
    However it is not possible to loose file. The file can be not accessible but and it could be fix. Move parent folder to different on (c:\1) rename folders.
    Also you can archive folders structure and then extract onle files . Some programs such as Robocopy and Total Comander also work with very long path.
    Attached Files Attached Files
    Last edited by BMV; 06-15-2020 at 03:21 PM.

  14. #14
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: File Path Length Excel

    You can also try just

    =CELL("filename")

    in any cell

  15. #15
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Usually at work, in the UK
    MS-Off Ver
    Excel 2010
    Posts
    639

    Re: File Path Length Excel

    cell a1 paste this
    HTML Code: 
    Cell b1 paste this
    HTML Code: 
    Last edited by Sc0tt1e; 06-16-2020 at 04:30 AM.

  16. #16
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: File Path Length Excel

    @ maniacb, Sc0tt1e
    =CELL("filename") return file path and caller sheet name. Book name will be in the square brackets also.

  17. #17
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Usually at work, in the UK
    MS-Off Ver
    Excel 2010
    Posts
    639

    Re: File Path Length Excel

    I see what you mean

  18. #18
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,719

    Re: File Path Length Excel

    Got it!

    Thank you all !

  19. #19
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,719

    Re: File Path Length Excel

    Question:
    What is exactly the maximum of length of the document? What will happen if you go over the max?

    Thank you

  20. #20
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: File Path Length Excel

    For NTFS is not limited
    For explorer and moust programm full path must be less 260 characters
    but for excel 218 characters https://support.microsoft.com/en-us/...rs=en-us&ad=us

  21. #21
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,719

    Re: File Path Length Excel

    Ok... Thank you.

  22. #22
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,719

    Re: File Path Length Excel

    Question guys,

    Do I need to change "filename" to the name of the workbook?

    Should it be automatically change "filename" to its workbook name?

    Not the worksheet name, right?

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Length of a picture’s path
    By CobraLAD in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-19-2019, 08:39 AM
  2. Maximum length of File plus path name for excel workbooks
    By Hari Prasadh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-02-2014, 06:53 AM
  3. [SOLVED] UNC Path length problem opening a file in excel 2002 or 2003
    By John in forum Excel General
    Replies: 5
    Last Post: 08-07-2014, 02:02 PM
  4. Find filename, path, document size, filename length and path length?
    By Laneyboggs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-30-2010, 08:01 PM
  5. Replies: 7
    Last Post: 10-09-2009, 10:10 AM
  6. Find Folder Path + file Name Length and Insert into Spreadsheet
    By Steve Roberts in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-26-2005, 01:01 PM
  7. [SOLVED] Path\File name length problem Excel Crash on save as
    By Datasort in forum Excel General
    Replies: 0
    Last Post: 04-08-2005, 01:06 PM

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