Formula to look for a file in a folder not specifying file name

misiek5510

New Member
Joined
May 25, 2021
Messages
38
Office Version
  1. 2016
Platform
  1. Windows
  2. Mobile
Hi,

I'm getting exports in excel file on daily basis, which are then put in a folder. All old versions are deleted prior to this, so there is always just one file in the folder.
I need formula to use the only file from that folder without specifying the file name (in red below). Is there a way to do it?

='C:\Users\user\Desktop\Compliance\Folder\Export\[data.xls]Sheet1'!$A$2
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
I don't think there is a way to do it without VBA.
Excel formulas are going to want the exact file name.

If you use VBA, you can search the folder to get the file name, and then write that to the formula.
Are you open to a VBA solution?
 
Upvote 0

Forum statistics

Threads
1,214,940
Messages
6,122,356
Members
449,080
Latest member
Armadillos

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