+ Reply to Thread
Results 1 to 5 of 5

Find and split file path from Excel Cell

Hybrid View

  1. #1
    Registered User
    Join Date
    10-09-2018
    Location
    Sydney
    MS-Off Ver
    Win/Mac Office 365
    Posts
    2

    Find and split file path from Excel Cell

    Hey All,

    Just wondering if there is a formula I can run that will look at my cell col A1 which contains "Y:\Joinery\JOBS\2018\34AIJ_Locker\Puzzle_Locker\Locker 300x500x2100.top" but I want it to remove the filename and only show the file path, IE Y:\Joinery\JOBS\2018\34AIJ_Locker\Puzzle_Locker\

    Note, The number of subdirectories will vary, I'm trying to find a way to find the first "\" inset from RHS and delete all text theirs after.

    Hope that makes sense.
    Last edited by AliGW; 10-09-2018 at 08:37 AM. Reason: Thread incorrectly tagged (solved) - now amended.

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Find and split file path from Excel Cell

    Try this formula
    =SUBSTITUTE(A1,TRIM(RIGHT(SUBSTITUTE(A1,"\",REPT(" ",99)),99)),"")
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Registered User
    Join Date
    10-09-2018
    Location
    Sydney
    MS-Off Ver
    Win/Mac Office 365
    Posts
    2

    Re: Find and split file path from Excel Cell

    That worked perfectly, thanks for your help.

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Find and split file path from Excel Cell

    You're welcome. Glad I can offer little help
    Please mark the thread as solved

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,658

    Re: Find and split file path from Excel Cell

    For future reference, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

    I have done it for you this time.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

+ 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. [SOLVED] Run-time error '-2147024894 (80070002)': Cannot find this file. Verify the path and file n
    By Matthew55 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-16-2018, 12:01 PM
  2. Find path name of links in PPT file
    By apantorsk in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-04-2016, 06:01 AM
  3. Find last row in closed workbook using file path name
    By amazingg64 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-27-2012, 09:22 AM
  4. Find the Path! (File Attached!)
    By kidongee in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-23-2011, 12:44 PM
  5. Find File Path to USB Drive
    By andyrads in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-15-2009, 05:32 PM
  6. Asking to find file path when updating?
    By whizzards23 in forum Excel General
    Replies: 0
    Last Post: 07-07-2008, 12:40 PM
  7. Find the file path only
    By Crispie38 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-23-2007, 10:15 AM

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