Consulting

Results 1 to 2 of 2

Thread: Populate Excel -Output Tab based on Input Tab

  1. #1
    VBAX Regular
    Joined
    Nov 2015
    Posts
    43
    Location

    Populate Excel -Output Tab based on Input Tab

    I have several Input excel files in my directory. I am trying to populate output Tab based on values on "Input" Tab. Save the file.
    I have attached two "Test1" and "Test2" files. The program will open "Test1" ,populate "output" tab and save it. Then open "Test2"
    populate "output" tab and save it.

    Any suggestion how to accomplish this.
    Attached Files Attached Files

  2. #2
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    Hints:
    Use Dir with MyPath & "test*.xlsx"

    TestBook = Dir(MyPath& "test*.xlsx")

    Loop from here
    Set InputWB = Workbooks.Open (MyPath & TestBook)

    InputWb.Sheets("Input").Range("A1").CurrentRegion.Offset(1).Copy

    ThisWorkbook.Cells(Rows.Count, 1).End(xlUp).Offset(1).PasteSpecial(xlPasteValues)

    Loop While TestBook <> ""
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

Posting Permissions

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