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.
Bookmarks