Hi,
Is it possible to refer one excel from another excel with partial name?
Below is my macro(working fine), in this example I am refering "September2_MonthData.xls"(excel will be open when refering) excel document from another excel "consolidated Data.xls".
Now the question is it possible to refer "September2_MonthData.xls" excel doc like any excel open(active) document ending with "%%%%%_MonthData.xls" from another excel "consolidated Data.xls".
Because for every week, there will be one excel document, so instead of changing name of excel doc name in macro everyweek, is it possible to refer like "%%%%%_MonthData.xls" from another excel "consolidated Data.xls"?
------------
Dim i, j As Integer
Dim BETA As Worksheet
Sub Data()
Set BETA = Workbooks("September2_MonthData.xls").Worksheets("BETA")
BETA.Activate
i = 2
j = 2
Do While BETA.Cells(j, 1) <> ""
ALPHA.Cells(i, 3).Value = BETA.Cells(j, 1).Value
..........
..........
j = j + 1
i = i + 1
Loop
End Sub
===============================
Bookmarks