PDA

View Full Version : Populate Excel -Output Tab based on Input Tab



pivotguy
01-04-2016, 01:49 PM
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.

SamT
01-04-2016, 05:46 PM
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 <> ""