Skip to main content

Posts

Showing posts with the label Copy and paste the data entered into a master data worksheet in a different workbook

Copy and paste the data entered into a master data worksheet in a different workbook

Copy and paste the data entered into a master data worksheet in a different workbook Sub CopyDataMacro() Workbooks.Open "D:\test\MasterData.xlsx" ThisWorkbook.Sheets("test1").Range(A11:K20").Copy Workbooks("MasterData.xlsx").Sheets( "test1").Cells(Rows.Count, 3).End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteValues ThisWorkbook.Sheets("test1").Range(C5").Copy Workbooks("MasterData.xlsx").Sheets( "test1").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteValues ThisWorkbook.Sheets("test1").Range(C6").Copy Workbooks("MasterData.xlsx").Sheets( "test1").Cells(Rows.Count, 2).End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteValues Workbooks("MasterData.xlsx").Save Workbooks("MasterData.xlsx").Close End Sub