Hey, I need a macro which would open a workbook, copy values which are stored in many different (but always the same) cells and paste it a template also to many different, but always the same cells. Unfortunately it is not possible to move those cells in any of those files to simplify this process. I have a tiny bit of code, but I have no idea how to make it to copy and paste many cells t once. Mine copies either a cell or a range of cells which are grouped together. I'm not adding any example file caus it could work the same way on any 2 workbooks. If any will be needed - I can provide some.
Sub Get_Data_From_File()
Dim FileToOpen As Variant
Dim OpenBook As Workbook
Dim Range1 As Range
Application.ScreenUpdating = False
FileToOpen = Application.GetOpenFilename(Title:="Select calculated PPR and import data to MAGNA OS template", FileFilter:="Excel Files (*.xls*),*xls*")
If FileToOpen <> False Then
Set OpenBook = Application.Workbooks.Open(FileToOpen)
OpenBook.Sheets(1).Range("V19").Copy
ThisWorkbook.Worksheets("SelectFile").Range("A10").PasteSpecial xlPasteValuesAndNumberFormats
OpenBook.Close False
Application.CutCopyMode = False
Range("A1").Select
End If
Application.ScreenUpdating = True
End Sub
Bookmarks