+ Reply to Thread
Results 1 to 2 of 2

Extracting information from file names

  1. #1
    Registered User
    Join Date
    07-22-2010
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    58

    Extracting information from file names

    Hello all,

    In a spreadsheet, I have data in Column A:A which look like this:

    Aberdeen-Section7-Run24-Revb.xlsx
    Plymouth-Section2-Run12-RevC.xlsx


    (they are filenames that have previously been extracted)



    Now I would like to write a vba code to store the different parts of the name in different cells, like this:

    Range(B1) = Aberdeen
    Range(C1) = Section7
    Range(D1) = Run24
    Range(E1) = Revb


    What would be a good way to achieve this?

    Thanks in advance

    If anything is unclear, please let me know


    Lovi

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Extracting information from file names

    you can use the data-text to columns method to do that without code-simply specify '-' as the delimiter
    Josie

    if at first you don't succeed try doing it the way your wife told you to

+ 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