![]() |
#1
|
|||
|
|||
![]()
Hi,
I'm in the process of copying a lot of data from many workbooks to a master workbook, and I want to see If I can Loop through Each workbook and copy a range of data from 2 different sheets within each workbook back to one sheet in the master workbook. It's taken me days just to copy data and it's a waste of my time and would appreciate any help I can get to write a piece of code that does this. Also the simple method of using the following code below to copy to another workbook does not work and always follows with an error. Workbooks("Gerotor Design Studio Results.xlsm").Sheets("Sheet5").Range("A1").Copy _ Destination:=Workbooks("Book1.xlsx").Sheets("Effic iency Map") Also the workbooks I want to copy data from are essentially in the same format and thus the cell locations do not change which I hope makes it easier. From the book 1 attachment, I want to copy the flow rates from Sheet("Flow_Pressure") and the Volumetric and Mechanical Efficiency from Sheet("Efficiencies") and then past them into my master workbook("Gerotor Design Studio Results("Master") into Sheet1. At the moment I've been using the following code to copy the data I want to a new sheet and then manually copying it into my master workbook: Sub LowToHighSpeedsLowPressures() Sheets("Flow_Pressure").Range("C4:C9").CopyDestina tion:=Sheets("Sheet5").Range("A1:A6") Sheets("Flow_Pressure").Range("C10:C15").CopyDesti nation:=Sheets("Sheet5").Range("A17:A22") Sheets("Flow_Pressure").Range("C16:C21").CopyDesti nation:=Sheets("Sheet5").Range("A33:A38") Sheets("Flow_Pressure").Range("C22:C27").CopyDesti nation:=Sheets("Sheet5").Range("A49:A54") Sheets("Flow_Pressure").Range("C28:C33").CopyDesti nation:=Sheets("Sheet5").Range("A65:A70") Sheets("Flow_Pressure").Range("C34:C39").CopyDesti nation:=Sheets("Sheet5").Range("A81:A86") Sheets("Efficiencies").Range("C4:C9").CopyDestinat ion:=Sheets("Sheet5").Range("A177:A182") Sheets("Efficiencies").Range("C10:C15").CopyDestin ation:=Sheets("Sheet5").Range("A193:A198") Sheets("Efficiencies").Range("C16:C21").CopyDestin ation:=Sheets("Sheet5").Range("A209:A214") Sheets("Efficiencies").Range("C22:C27").CopyDestin ation:=Sheets("Sheet5").Range("A225:A230") Sheets("Efficiencies").Range("C28:C33").CopyDestin ation:=Sheets("Sheet5").Range("A241:A246") Sheets("Efficiencies").Range("C34:C39").CopyDestin ation:=Sheets("Sheet5").Range("A257:A262") Sheets("Efficiencies").Range("D4 ![]() Sheets("Efficiencies").Range("D10 ![]() Sheets("Efficiencies").Range("D16 ![]() Sheets("Efficiencies").Range("D10 ![]() Sheets("Efficiencies").Range("D16 ![]() Sheets("Efficiencies").Range("D16 ![]() Application.CutCopyMode = False End Sub |
Tags |
copy and paste, vba code, workbooks |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
rsrasc | Excel Programming | 4 | 08-19-2018 04:00 PM |
Sharing a Workbook that contains array formula link to other workbook | Ahmad.rage22@gmail.com | Excel | 0 | 03-12-2018 10:15 PM |
![]() |
eleno5485 | Excel | 1 | 04-07-2017 03:30 PM |
data entered in one workbook should be updated in other relevant workbook based on the date | vedha | Excel | 0 | 04-24-2015 08:45 PM |
Range(Cell1,Cell2) Error on another workbook controlling some other workbook? | tinfanide | Excel Programming | 1 | 02-09-2012 04:08 PM |