Greetings,
I am trying to build a macro that will allow me to copy row values in columns B - I from one workbook (Master) into a another workbook for each File Name listed in Column A into a corresponding workbook with the same file name that will be open at the time. The ranges the values will be copied to in the corresponding workbooks will always be the same...it will be the file names that may vary depending on circumstances.
Here is the beginning of some code that I have however I do not have the knowledge to generate a macro that goes through each value in the File Name column above and copies the corresponding row values to the matching workbook. The # of values in the File Name column would not exceed 50 rows if that makes a difference or not.
Thanks in advance for any assistance.
Chad
I am trying to build a macro that will allow me to copy row values in columns B - I from one workbook (Master) into a another workbook for each File Name listed in Column A into a corresponding workbook with the same file name that will be open at the time. The ranges the values will be copied to in the corresponding workbooks will always be the same...it will be the file names that may vary depending on circumstances.
A | B | C | D | E | F | G | H | I | |
1 | FILE NAME | VALUE 1 | VALUE 2 | VALUE 3 | VALUE 4 | VALUE 5 | VALUE 6 | VALUE 7 | VALUE 8 |
2 | 874 | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 |
3 | 921 | 11 | 22 | 33 | 44 | 55 | 66 | 77 | 88 |
Here is the beginning of some code that I have however I do not have the knowledge to generate a macro that goes through each value in the File Name column above and copies the corresponding row values to the matching workbook. The # of values in the File Name column would not exceed 50 rows if that makes a difference or not.
Excel Formula:
Sub copytoanotherwb()
Workbooks("Master.xlsm").Worksheets("Sheet1").Range("B1").Copy
Workbooks("874.xlsx").Worksheets("MATRIX CALCULATOR").Range("J56").PasteSpecial Paste:=xlPasteValues
Workbooks("Master.xlsm").Worksheets("Sheet1").Range("C1").Copy
Workbooks("874.xlsx").Worksheets("MATRIX CALCULATOR").Range("K56").PasteSpecial Paste:=xlPasteValues
Workbooks("Master.xlsm").Worksheets("Sheet1").Range("D1").Copy
Workbooks("874.xlsx").Worksheets("MATRIX CALCULATOR").Range("L56").PasteSpecial Paste:=xlPasteValues
Workbooks("Master.xlsm").Worksheets("Sheet1").Range("E1").Copy
Workbooks("874.xlsx").Worksheets("MATRIX CALCULATOR").Range("M56").PasteSpecial Paste:=xlPasteValues
Workbooks("Master.xlsm").Worksheets("Sheet1").Range("F1").Copy
Workbooks("874.xlsx").Worksheets("MATRIX CALCULATOR").Range("J61").PasteSpecial Paste:=xlPasteValues
Workbooks("Master.xlsm").Worksheets("Sheet1").Range("G1").Copy
Workbooks("874.xlsx").Worksheets("MATRIX CALCULATOR").Range("K61").PasteSpecial Paste:=xlPasteValues
Workbooks("Master.xlsm").Worksheets("Sheet1").Range("H1").Copy
Workbooks("874.xlsx").Worksheets("MATRIX CALCULATOR").Range("M61").PasteSpecial Paste:=xlPasteValues
Workbooks("Master.xlsm").Worksheets("Sheet1").Range("I1").Copy
Workbooks("874.xlsx").Worksheets("MATRIX CALCULATOR").Range("J65").PasteSpecial Paste:=xlPasteValues
Workbooks("Master.xlsm").Worksheets("Sheet1").Range("J1").Copy
Workbooks("874.xlsx").Worksheets("MATRIX CALCULATOR").Range("L65").PasteSpecial Paste:=xlPasteValues
Workbooks("Master.xlsm").Worksheets("Sheet1").Range("K1").Copy
Workbooks("874.xlsx").Worksheets("MATRIX CALCULATOR").Range("M65").PasteSpecial Paste:=xlPasteValues
Workbooks("Master.xlsm").Worksheets("Sheet1").Range("B2").Copy
Workbooks("921.xlsx").Worksheets("MATRIX CALCULATOR").Range("J56").PasteSpecial Paste:=xlPasteValues
Workbooks("Master.xlsm").Worksheets("Sheet1").Range("C2").Copy
Workbooks("921.xlsx").Worksheets("MATRIX CALCULATOR").Range("K56").PasteSpecial Paste:=xlPasteValues
Workbooks("Master.xlsm").Worksheets("Sheet1").Range("D2").Copy
Workbooks("921.xlsx").Worksheets("MATRIX CALCULATOR").Range("L56").PasteSpecial Paste:=xlPasteValues
Workbooks("Master.xlsm").Worksheets("Sheet1").Range("E2").Copy
Workbooks("921.xlsx").Worksheets("MATRIX CALCULATOR").Range("M56").PasteSpecial Paste:=xlPasteValues
Workbooks("Master.xlsm").Worksheets("Sheet1").Range("F2").Copy
Workbooks("921.xlsx").Worksheets("MATRIX CALCULATOR").Range("J61").PasteSpecial Paste:=xlPasteValues
Workbooks("Master.xlsm").Worksheets("Sheet1").Range("G2").Copy
Workbooks("921.xlsx").Worksheets("MATRIX CALCULATOR").Range("K61").PasteSpecial Paste:=xlPasteValues
Workbooks("Master.xlsm").Worksheets("Sheet1").Range("H2").Copy
Workbooks("921.xlsx").Worksheets("MATRIX CALCULATOR").Range("M61").PasteSpecial Paste:=xlPasteValues
Workbooks("Master.xlsm").Worksheets("Sheet1").Range("I2").Copy
Workbooks("921.xlsx").Worksheets("MATRIX CALCULATOR").Range("J65").PasteSpecial Paste:=xlPasteValues
Workbooks("Master.xlsm").Worksheets("Sheet1").Range("J2").Copy
Workbooks("921.xlsx").Worksheets("MATRIX CALCULATOR").Range("L65").PasteSpecial Paste:=xlPasteValues
Workbooks("Master.xlsm").Worksheets("Sheet1").Range("K2").Copy
Workbooks("921.xlsx").Worksheets("MATRIX CALCULATOR").Range("M65").PasteSpecial Paste:=xlPasteValues
End Sub
Thanks in advance for any assistance.
Chad