Macro for copying data to a new worksheet

johnsource

New Member
Joined
Aug 9, 2010
Messages
3
Hello,

I need a Macro to copy data to a new worksheet the condition is IF any data is same in "F"column then the entire subsequent rows should be copied into new worksheet also all the sheets should contain the same headings in the masterfile.


I am placing a example:


A B C D E F

Deal Nos Rated Issuer Issue core ID Issuer


Abbey National Treasury Services plc
865857 Rated -- N 26-Mar-10 Abbey National Treasury Services plc
862877 Rated N 11-Mar-10 Abbey National Treasury Services plc
858825 N 9-Mar-10 Acea SpA


over here first 3 records are matching through Issuer name in column "F" so the entire rows should be copied to new worksheet(New Excel workbook and not only sheets in one workbook) and the name of the sheet should be the Issuers name.
 

Some videos you may like

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

jbeaucaire

Well-known Member
Joined
May 8, 2002
Messages
6,012
'SHEET1 TO MANY WORKBOOKS

I have a macro that may be "ready to use" for parsing rows of data from one sheet to many workbooks named for the same values.


My macro names the workbooks for values in the column PLUS today's date, you can take a stab at removing the date part...or leave it in, it's a good technique.

The 4 variables you need to edit are highlighted for you. You'd want to change the vCol = 5 for column F.
 

johnsource

New Member
Joined
Aug 9, 2010
Messages
3
'SHEET1 TO MANY WORKBOOKS

I have a macro that may be "ready to use" for parsing rows of data from one sheet to many workbooks named for the same values.My macro names the workbooks for values in the column PLUS today's date, you can take a stab at removing the date part...or leave it in, it's a good technique.

The 4 variables you need to edit are highlighted for you. You'd want to change the vCol = 5 for column F.




'Get a temporary list of unique values from column A
ws.Columns(vCol).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=ws.Range("EE1"), Unique:=True



failed at above code please help
 

Watch MrExcel Video

Forum statistics

Threads
1,127,501
Messages
5,625,166
Members
416,075
Latest member
TechJosh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top