Help with INDIRECT Formula referencing a CSV file...

OzPanda

New Member
Joined
Mar 1, 2012
Messages
19
Hi Excel Guru Wizards' brains' trust.

Can you spare a moment to help me with a formula. or suggestion an alt soln. Please.

Ok so here is the background.

In a folder, a new CSV file with the date gets added each day at the start of the day.

e.g. The folder has heaps of csv files.
"Data2022_08_10.csv"
"Data2022_08_09.csv"
"Data2022_08_08.csv"
"Data2022_08_07.csv"
"Data2022_08_06.csv"

I have an excel spreadsheet tool that I use. I want to add in formula inside to reference a CSV file. A1 A2 A3 the whole table like around 50 cells A1:E10.
I plan to use something like this =text(today(),"yyyy_mm_dd")&".csv" to get the latest CSV file that is for today.

How do I use INDIRECT to reference the csv data??
Also once I get that working, I want to add another feature so if it returns an error that is the CSV file hasn't been created yet, use the previous day. so today()-1.

I think excel lets you do some other CSV linking of the data but that way seems slow for some reason. Or should I do it in VBA and this method.

Is there a way to use INDERICT formula to get it to work?
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,223,952
Messages
6,175,595
Members
452,657
Latest member
giadungthienduyen

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