Data import based on date & time filename

james.goacher

New Member
Joined
Oct 5, 2011
Messages
2
Hi everyone

Im looking for a little step in the right direction.
I need to setup an excel sheet that imports data from text files. The data is fixed width with some columns ignored. If the filename was the same i would just record a macro howver the filename is dependent on what date & time the user requires. Below is an example of the filename

fsc1_log2011100407

fsc1_log is a constant and the rest is yyyy mm dd hh. At the moment I have the fields ready for the user to select date and time but how do i go about automating the import process onto a new sheet?

Hope you guys can help
Cheers
James
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Thanks Joe4

However it needs to be as simple as possible and I know it sounds a bit mean but I showed someone the process and it blew their mind so thats the type of people that are using it. The way I have explained is layed out nice and neat and stress free for users not comfortable with computers and spreadsheets

I shall carry on searching & reading up

Cheers
 
Upvote 0
They people using it don't need to know the first thing about using VBA.

If you incorporate the code, all they have to do is click a button, and it will bring up a file browse window to the exact directory you want it to go to. All the user has to do is select the file they want (which, it sounds like will already have the date and time built into it), and the rest will be automated.

I don't see how that is any more complex than what you are asking for. Instead of asking the user to enter a date and time, they simply select the file with the date and time they want. It should actually by less keying, and remove the possibility of any typos.
 
Upvote 0

Forum statistics

Threads
1,224,520
Messages
6,179,270
Members
452,902
Latest member
Knuddeluff

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