I currently work from five different workbooks and I usually need data from all of them so I tend to copy all five workbooks (each one only contains one sheet) to a new workbook and then run some vlookups from that new workbook.
I was wondering if there was a way to run a macro that could do that copy for me. For example if it could search for workbook X1 (or even sheet X1) and then copy that to NewWorkbook.SheetX1 and then look for workbook (or sheet) XX2 and copy that to NewWorkbook.SheetXX2, etc etc etc
The workbook names always vary in their endings but the beginnings are the same so is there a way to run maybe an if statement. For example:
if left(all open workbook titles) = "ABC" then copy sheet to new workbook.sheet ABC else if left(open workbooks titles) = "XYZ" then copy sheet to new workbook.sheet XYZ
Thanks
I was wondering if there was a way to run a macro that could do that copy for me. For example if it could search for workbook X1 (or even sheet X1) and then copy that to NewWorkbook.SheetX1 and then look for workbook (or sheet) XX2 and copy that to NewWorkbook.SheetXX2, etc etc etc
The workbook names always vary in their endings but the beginnings are the same so is there a way to run maybe an if statement. For example:
if left(all open workbook titles) = "ABC" then copy sheet to new workbook.sheet ABC else if left(open workbooks titles) = "XYZ" then copy sheet to new workbook.sheet XYZ
Thanks