Named file folder range live updated and sorted

Retroshift

Board Regular
Joined
Sep 20, 2016
Messages
119
Office Version
  1. 2019
Platform
  1. Windows
Hi,

I have a listFiles named range to return a list of files of a specific folder into Excel. I use the following formula:
Excel Formula:
=IFERROR(INDEX(listFiles,ROW()-ROW(A$2)),"")
I was wondering if there is a non-VBA solution to automatically/live update the files list in the Excel named range whenever a file in the folder gets added, deleted or modified.
Moreover, is there an Excel formula to alphanumerically sort these files dynamically/live?
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Also how have you defined ListFiles?
 
Upvote 0
Updated. I use the Windows platform and Excel 2019.

I defined listFiles:
Excel Formula:
=FILES(Sheet1!$A$1)
 
Upvote 0
Ok, in Sheet1!A1 you could use
Excel Formula:
=IF(NOW(),"C:\Mrexcel\*")
this will mean the list will update anytime the workbook recalculates.
 
Upvote 0
Ok, in Sheet1!A1 you could use
Excel Formula:
=IF(NOW(),"C:\Mrexcel\*")
this will mean the list will update anytime the workbook recalculates.
Thanks, but I was wondering if the workbook could recalculate by itself without having to press F9?
And also, if it could live sort the list alphanumerically?
 
Upvote 0
The list is sorted alphabetically for me, regardless of how the files are sorted in the folder.

The workbook can recalculate itself, but as the formula in A1 is volatile, the list will update whenever any cell in any open workbook is changed, or recalcs.
 
Upvote 0
- I don't know why but the list does not return sorted in my sheet, and I cannot sort it with the sort and filter function.

- Is there an option to autorecalculate by itself without updating any cell in a workbook, or without having to press F9?
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,874
Members
452,363
Latest member
merico17

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