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.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
'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.
 
Upvote 0
'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
 
Upvote 0

Forum statistics

Threads
1,213,511
Messages
6,114,054
Members
448,543
Latest member
MartinLarkin

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
Back
Top