that's the obvious solution.
On a 'parameter' worksheet the user fills in the starting date and the end date (or just the month). The macro 'calculates' all (28 to 31) filenames, and imports them into consecutive worksheets.
To have the summary formulas correct, the macro also should clear the 'remaining' days (for example: day 31 of april) or the sum should include March 31, or course.
Consider to include the date in each row of each text file, then import to and report from MS Access in stead of using MS Excel. Somehow, a database program like Access is more up to the task then a spreadsheet. Of course, the problem of constructing file names for input text files stays the same as long as you have a different file each day, but using Access like this makes it possible to have one text file for the whole month, which might (just might, you don't tell anything about where they originate from) be easier then having 31 files. But it really depends on where the data come from, so this is just a suggestion you can just as well consider as foolish.
Hope this helps.
Hi, I'm using Excel 2002 and I need some help. I have ~30 text files (one for each day of the month) that I need to import into separate worksheets, and then have a report page that summarizes them. I can do this manually. Problem is, I need to be able to use a selectable date range to import. I have a macro that imports the data using a data refresh, but it doesn't work too well and makes the user select each of the import files separately. I would like to somehow select a starting and ending day, then have it import all of the data for the range. Hope this makes sense, if someone can give me a recommendation or a direction to head in, I'll be able to figure it out I think...