Results 1 to 10 of 10

Trying to extract Date from filename "Inventory OH(3-29-2017_6-18)" Varying* Day length*

Threaded View

Joshi Ram Trying to extract Date from... 04-04-2017, 11:30 AM
mike7952 Re: Trying to extract Date... 04-04-2017, 11:45 AM
Joshi Ram Re: Trying to extract Date... 04-04-2017, 12:02 PM
jolivanes Re: Trying to extract Date... 04-04-2017, 12:54 PM
jindon Re: Trying to extract Date... 04-04-2017, 12:31 PM
Joshi Ram Re: Trying to extract Date... 04-04-2017, 02:50 PM
bakerman2 Re: Trying to extract Date... 04-04-2017, 12:31 PM
Joshi Ram Re: Trying to extract Date... 04-04-2017, 01:23 PM
bakerman2 Re: Trying to extract Date... 04-04-2017, 04:41 PM
jindon Re: Trying to extract Date... 04-04-2017, 07:35 PM
  1. #1
    Registered User
    Join Date
    04-04-2017
    Location
    Chicago,IL
    MS-Off Ver
    2013
    Posts
    10

    Trying to extract Date from filename "Inventory OH(3-29-2017_6-18)" Varying* Day length*

    Hello Everyone,

    I have been trying to extract Year, Month, Day and Date from the Filename "Inventory OH(3-29-2017_6-18)" and Paste Day in A1, Month in A2, Year in A3 and Date in A4 of Master File using VBA Code... Have to repeat this process for 500 different excel workbooks into a single Excel Master Sheet. The problem here is the Day could be a Single Digit or a double digit an the month could be a single digit or double digit.

    I have near about 500 files to with random dates, I need to extract Date from each file, paste it in Cell ("A$4","B$4",..... )for all the 500 files and get the data of OH Inventory under the date

        
        day = Mid(MyFile,7, 2)
        month = Mid(MyFile, 5, 2)
        year = Mid(MyFile, 1, 4)
        newDate = day + "/" + month + "/" + year
    I could use the above code, but the Date and Month Varies for each file, I mean. Date could be a single digit or double digit and Month could be a single digit or double digit.

    Thanks for your time.
    Last edited by 6StringJazzer; 04-04-2017 at 12:49 PM. Reason: code tags

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 9
    Last Post: 03-09-2021, 11:54 PM
  2. Varying multiplier based on "Y" or "N" answer
    By Jwork6 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-16-2016, 01:01 PM
  3. Replies: 1
    Last Post: 01-22-2016, 09:21 AM
  4. Replies: 1
    Last Post: 09-09-2013, 11:41 AM
  5. Replies: 0
    Last Post: 08-09-2012, 04:31 PM
  6. Extract "Time" from custom "Date and Time" format
    By ben_patto in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-24-2009, 08:47 PM
  7. Replies: 5
    Last Post: 09-19-2008, 04:02 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