abdelfattah
Well-known Member
- Joined
- May 3, 2019
- Messages
- 1,490
- Office Version
- 2019
- 2010
- Platform
- 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
thanks in advance
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 | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | |||
1 | |||||||||||||
2 | directory | D:\files | directory | D:\files | directory | D:\files | |||||||
3 | folder | reports | folder | reports1 | folder | reports2 | |||||||
4 | subfolder | sales | subfolder | sales | subfolder | purchase | |||||||
5 | item | file name | last modified date | item | file name | last modified date | item | file name | last modified date | ||||
6 | 1 | df.xlsx | 01/02/2021 | 1 | ss2.pdf | 01/23/2021 | 1 | pr1.docx | 01/23/2021 | ||||
7 | 2 | 22.xlsm | 01/03/2021 | 2 | ss3.pdf | 01/24/2021 | 2 | pr2.docx | 01/24/2021 | ||||
8 | 3 | rp1.pdf | 01/04/2021 | 3 | ss4.pdf | 01/25/2021 | 3 | pr3.docx | 01/25/2021 | ||||
9 | 4 | rp1.pdf | 01/05/2021 | 4 | ss5.pdf | 01/26/2021 | 4 | pp.xls | 01/26/2021 | ||||
10 | 5 | rp1.pdf | 01/06/2021 | 5 | ss6.pdf | 01/27/2021 | 5 | pl.pdf | 01/27/2021 | ||||
11 | 6 | rp1.pdf | 01/07/2021 | 6 | ss7.pdf | 01/28/2021 | 6 | pm.xlsx | 01/28/2021 | ||||
12 | 7 | rr.docx | 01/08/2021 | 7 | ss8.pdf | 01/29/2021 | |||||||
13 | 8 | rr.docx | 01/09/2021 | 8 | ss9.pdf | 01/30/2021 | |||||||
14 | 9 | rr.docx | 01/10/2021 | ||||||||||
15 | 10 | rr.docx | 01/11/2021 | ||||||||||
16 | 11 | rr.docx | 01/12/2021 | ||||||||||
17 | 12 | rr.docx | 01/13/2021 | ||||||||||
18 | 13 | mov1.avi | 01/14/2021 | ||||||||||
19 | 14 | mov1.avi | 01/15/2021 | ||||||||||
20 | 15 | mov1.avi | 01/16/2021 | ||||||||||
21 | 16 | mov1.avi | 01/17/2021 | ||||||||||
22 | 17 | mov1.avi | 01/18/2021 | ||||||||||
23 | 18 | sal1.ppt | 01/19/2021 | ||||||||||
24 | 19 | sal1.ppt | 01/20/2021 | ||||||||||
25 | 20 | sal1.ppt | 01/21/2021 | ||||||||||
26 | 21 | sal1.ppt | 01/22/2021 | ||||||||||
JAN |
thanks in advance