Results 1 to 5 of 5

refer one excel from another excel with partial name

Threaded View

  1. #1
    Registered User
    Join Date
    09-20-2010
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    10

    refer one excel from another excel with partial name

    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
    ===============================
    Last edited by syprakash; 10-03-2010 at 03:05 PM. Reason: Using code tags around code

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1