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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

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
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,632
Messages
5,838,472
Members
430,549
Latest member
jayjay2022

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