Drawing Data from Multiple Spreadsheets

HamiTipene

Board Regular
Joined
Jun 28, 2006
Messages
67
Hi,

I need to draw data from weekly sheets spanning over a number of years. It is outflow data that can be found in the same format in each sheet. The problem is that each sheet is in different directories sorted by week and year. It is logical (directories are named by year, with subdirectories Week0108-Week5208). I am a little unfamiliar of how to open sheets by name. Could someone provide a start on how I might accomplish this task?
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
here is an example

Code:
Sub WeeklyFile()
Dim wFilename As String
Dim WkNO As String, CYr As String

WkNO = Format(Weeknum(Date), "00")
CYr = Format(Date, "yy")

wFilename = "Week" & WkNO & CYr
Workbooks.Open wFilename

End Sub
 
Upvote 0

Forum statistics

Threads
1,203,752
Messages
6,057,151
Members
444,908
Latest member
Jayrey

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