vrunda
Member
I have one workbook for 1 customer with all info. I want to copy the details from fixed range of cells at different locations, to another workbook. This i want to do for 100 customers. I have tried recording macro but it is recording name of workbook , so in genearl i cannot use same macro for other customers. Macro is below:
This is for trial hence only two range are selected in first workbook.
There are many different ranges to copy from first to second workbook.
The files name in red color will change for different customers.
In 1st & 2nd workbook copy paste ranges are same & sheets name are also same, only workbook name will differ.
Code:
Sub Copydata()
Windows("adgulhane1FORM-704v2 .xls").Activate
ActiveWindow.Activate
Range("C7:J7").Select
Selection.Copy
Windows("1FORMAT2014-704v2.xls").Activate
ActiveSheet.Paste
ActiveWindow.Activate
Windows("adgulhane1FORM-704v2 .xls").Activate
Range("H8:J8").Select
Application.CutCopyMode = False
Selection.Copy
Windows("1FORMAT2014-704v2.xls").Activate
Range("H8:J8").Select
ActiveSheet.Paste
End Sub
This is for trial hence only two range are selected in first workbook.
There are many different ranges to copy from first to second workbook.
The files name in red color will change for different customers.
In 1st & 2nd workbook copy paste ranges are same & sheets name are also same, only workbook name will differ.
Last edited by a moderator: