import folder and subfolder & files based on last modified date into each sheet and open

abdelfattah

Well-known Member
Joined
May 3, 2019
Messages
1,507
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
hi experts

I search for unique macro to import folder ,subfolder and files to each sheet based on last modified date and open when press cell contain folder or subfolder or file and if the last modified date changes then should move data from sheet contains old modified date based on month sheet to another sheet contain a new modified date based on month sheet . the sheets' names are months (JAN,FEB,MAR....etc.) and the directory is "D:\files"
note when import the data for each folder should copy to next column not to the bottom when I have many folders in directory and should create the headers with formatting and borders .

I put my imagine how should data in sheet JAN how as I said should open the cells contain (directory ,folder ,subfolder ,file name) for instance b:b4 , row 6 about file name
(2).xlsx
ABCDEFGHIJK
1
2directoryD:\filesdirectoryD:\filesdirectoryD:\files
3folderreportsfolderreports1folderreports2
4subfoldersalessubfoldersalessubfolderpurchase
5item file namelast modified date item file namelast modified date item file namelast modified date
61df.xlsx01/02/20211ss2.pdf01/23/20211pr1.docx01/23/2021
7222.xlsm01/03/20212ss3.pdf01/24/20212pr2.docx01/24/2021
83rp1.pdf01/04/20213ss4.pdf01/25/20213pr3.docx01/25/2021
94rp1.pdf01/05/20214ss5.pdf01/26/20214pp.xls01/26/2021
105rp1.pdf01/06/20215ss6.pdf01/27/20215pl.pdf01/27/2021
116rp1.pdf01/07/20216ss7.pdf01/28/20216pm.xlsx01/28/2021
127rr.docx01/08/20217ss8.pdf01/29/2021
138rr.docx01/09/20218ss9.pdf01/30/2021
149rr.docx01/10/2021
1510rr.docx01/11/2021
1611rr.docx01/12/2021
1712rr.docx01/13/2021
1813mov1.avi01/14/2021
1914mov1.avi01/15/2021
2015mov1.avi01/16/2021
2116mov1.avi01/17/2021
2217mov1.avi01/18/2021
2318sal1.ppt01/19/2021
2419sal1.ppt01/20/2021
2520sal1.ppt01/21/2021
2621sal1.ppt01/22/2021
JAN


thanks in advance
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Forum statistics

Threads
1,224,749
Messages
6,180,727
Members
452,995
Latest member
isldboy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top