+ Reply to Thread
Results 1 to 11 of 11

Is there any formula can read the data from the file name and mark it onto an excel file ?

  1. #1
    Registered User
    Join Date
    07-31-2022
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    25

    Is there any formula can read the data from the file name and mark it onto an excel file ?

    Every month, I need to scan thousands of testing reports into PDF format.

    The File naming system is : XXX ZZZZZ 2023-MM-DD.pdf

    XXX : station code (3 digits)
    ZZZZZ : Machine Number (from 2 digits to 5 digits)

    ALL pdf files will store in a directory
    C:\2023-01\XXX ZZZ 2023-MM-DD.pdf


    For example :
    I created 5 different PDF files

    CEN EAP1 2023-01-10.PDF
    CIO L2 2023-01-24.PDF
    JOR BL1 2023-01-07.PDF
    LIV L1 2023-01-21.PDF
    LON L1 2023-01-18.PDF


    My question is :
    Is there any excel formula be able to read from the above pdf file names and automatically mark "PM" in the attached excel file ?


    Or, is there any other intelligent ways to do the same ?
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,936

    Re: Is there any formula can read the data from the file name and mark it onto an excel fi

    Please Login or Register  to view this content.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    07-31-2022
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    25

    Re: Is there any formula can read the data from the file name and mark it onto an excel fi

    wow ... that's awesome
    thank you so much for that

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,936

    Re: Is there any formula can read the data from the file name and mark it onto an excel fi

    You're welcome...

  5. #5
    Registered User
    Join Date
    07-31-2022
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    25

    Re: Is there any formula can read the data from the file name and mark it onto an excel fi

    @protonLeah

    your VBA helped me a lot, very appreicated

    Just a bit more request, is it possible to generate a date and put it onto sheet "PM date" ?
    Please refer to a new attachment

    As this is requested by our client.
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,936

    Re: Is there any formula can read the data from the file name and mark it onto an excel fi

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    07-31-2022
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    25

    Re: Is there any formula can read the data from the file name and mark it onto an excel fi

    wow . . . that's great !!!
    thank you so much

  8. #8
    Registered User
    Join Date
    07-31-2022
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    25

    Re: Is there any formula can read the data from the file name and mark it onto an excel fi

    @protonLeah

    Can you please take a look at the excel file again ?
    The result generated at the sheet "PM Date" seems have problems.

    Sorry for causing you troubles.
    Attached Files Attached Files

  9. #9
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,936

    Re: Is there any formula can read the data from the file name and mark it onto an excel fi

    In the attached zipfile, several of the pdf's have the same CODE & UNIT, but different dates:
    Please Login or Register  to view this content.
    I think I have a fix, but it'll have to wait 'til tomorrow

  10. #10
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,936

    Re: Is there any formula can read the data from the file name and mark it onto an excel fi

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    07-31-2022
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    25

    Re: Is there any formula can read the data from the file name and mark it onto an excel fi

    Hello Proton,

    Thanks for your hard work.
    some errors during debugging, I am studying right now.

+ 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. Replies: 7
    Last Post: 07-19-2019, 06:30 AM
  2. Read binary data from non excel file and post in excel file
    By D S Rama Rao in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 01-05-2015, 05:33 PM
  3. read value of strings from a text file and make an excel file.
    By gashforing in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-08-2009, 07:12 AM
  4. Replies: 1
    Last Post: 08-18-2006, 10:40 AM
  5. Replies: 2
    Last Post: 12-12-2005, 02:35 PM
  6. [SOLVED] How to save a PC Excel file into MAC (it says file is read only)?
    By claudiosissa in forum Excel General
    Replies: 0
    Last Post: 11-29-2005, 10:00 PM
  7. Replies: 1
    Last Post: 09-12-2005, 09:05 AM

Tags for this Thread

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