![]() |
Copying From Master
I have a master spreadsheet "Master",
with a list (35 lines) of 15 products. e.g. Siemens, Motorola,Nokia (Some products have more than one line). I have have another workbook with 15 worksheets (one worksheet for each product). I need to write a macro which will copy the lines from the "Master" into each of the worksheets, so that for example- the Motorola Lines are copied to the worksheet caleed "Motorola" Many thanks for your help |
Copying From Master
Hi Teresa,
Use the following macro, which has been writtin for a button_click. Sub BMSort() Dim rng As Range, rng1 As Range Set rng = Worksheets("Master").Range("A1").CurrentRegion With Worksheets("Control Panel") Set rng1 = .Range(.Cells(1, "J"), .Cells(Rows.Count, "J").End(xlUp)) End With rng.AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=rng1, _ Copytorange:=Worksheets("New Sheet").Range("A1"), Unique:=False End Sub You'll need to specify various parameters, to ensure the advance filter copies the correct info to the correct tab. Feel free to e-mail me so I can supply specifics. "teresa" wrote: I have a master spreadsheet "Master", with a list (35 lines) of 15 products. e.g. Siemens, Motorola,Nokia (Some products have more than one line). I have have another workbook with 15 worksheets (one worksheet for each product). I need to write a macro which will copy the lines from the "Master" into each of the worksheets, so that for example- the Motorola Lines are copied to the worksheet caleed "Motorola" Many thanks for your help |
All times are GMT +1. The time now is 11:48 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com