Getting Date Modified

KlayColgrove

New Member
Joined
Oct 19, 2018
Messages
12
I have a list of files that are lined up using D:\Documents\* with the function =IFERROR(INDEX(FileNameList,ROW()-2),""). With this it lists all the files in my D drive. I'm trying to also display the date last modified of those files in the corresponding cell. Is that possible to do?
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
You can do that in easy way with PowerQuery (Get&Transform) with FromFolder option:

example:

[Table="width:, class:head"]
[tr=bgcolor:#FFFFFF][td=bgcolor:#70AD47]Name[/td][td=bgcolor:#70AD47]Date modified[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]s666-PQ-How to split cells that have Line Feed into their own row.xlsm[/td][td=bgcolor:#E2EFDA]
14/05/2019 05:04​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]s666-PQ-excel help.xlsx[/td][td]
14/05/2019 02:18​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]test-14052019.xlsm[/td][td=bgcolor:#E2EFDA]
14/05/2019 02:17​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]s666-PQ-Append tables and get unique values.xlsm[/td][td]
12/05/2019 07:03​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]s666-PQ-split addresses.xlsm[/td][td=bgcolor:#E2EFDA]
11/05/2019 21:07​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]Replace Values from a List.xlsx[/td][td]
11/05/2019 17:23​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]delete_book.xlsm[/td][td=bgcolor:#E2EFDA]
11/05/2019 15:09​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]s666-PQ-FL Workbook V2.xlsx[/td][td]
10/05/2019 09:08​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]delete-Book1.1.xlsm[/td][td=bgcolor:#E2EFDA]
10/05/2019 05:17​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]delete-Book1.xlsm[/td][td]
08/05/2019 22:03​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]s666-PQ-looking companies for person.xlsm[/td][td=bgcolor:#E2EFDA]
08/05/2019 06:44​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]s666-PQ-avoid error of Split Column.xlsm[/td][td]
07/05/2019 00:19​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]s666-PQ-fxTextSplitN.xlsm[/td][td=bgcolor:#E2EFDA]
06/05/2019 11:36​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]vba-urls from site.xlsm[/td][td]
06/05/2019 01:31​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]s666-PQ-room utilization and empty slots.xlsm[/td][td=bgcolor:#E2EFDA]
05/05/2019 04:28​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]test_10042019_1715.xlsm[/td][td]
29/04/2019 01:52​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]PQ-Number Grouped Rows.xlsx[/td][td=bgcolor:#E2EFDA]
28/04/2019 07:37​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]Book1.xlsm[/td][td]
28/04/2019 07:29​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]s666-PQ-how much sold in hour.xlsm[/td][td=bgcolor:#E2EFDA]
27/04/2019 23:33​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]s666-PQ-TFR base, removed blank columns.xlsm[/td][td]
26/04/2019 21:10​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]s666-PQ-Sort TableFromRecords.xlsm[/td][td=bgcolor:#E2EFDA]
26/04/2019 02:23​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]s666-PQ-Not purchased.xlsm[/td][td]
25/04/2019 15:41​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]test_17042019_1904.xlsm[/td][td=bgcolor:#E2EFDA]
21/04/2019 20:05​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]sections.xlsm[/td][td]
19/04/2019 02:32​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]multiple.xlsm[/td][td=bgcolor:#E2EFDA]
17/04/2019 19:49​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]s666-PQ-Calendar.xlsm[/td][td]
14/04/2019 01:54​
[/td][/tr]
[/table]



Code:
[SIZE=1]let
    Source = Folder.Files("[B][COLOR="#FF0000"]D:\your_path[/COLOR][/B]"),
    #"Removed Columns" = Table.RemoveColumns(Source,{"Content", "Extension", "Date accessed", "Date created", "Attributes", "Folder Path"}),
    #"Sorted Rows" = Table.Sort(#"Removed Columns",{{"Date modified", Order.Descending}})
in
    #"Sorted Rows"[/SIZE]

You can sort by date in ascending or descending order (here is descending)

is that something what you want?
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,159
Members
453,021
Latest member
Justyna P

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