Hi Everyone,
I am looking for help to automate a report. Let me explain what exactly I want.
There is master sheet in which we have data in around 1.2 lakhs rows and in column A to M. In column I there are around more then 300 vendor names given and i want to extract the data vendor wise in a separate tab then save that file with same vendor name in a different folder. I have used the below coding which gives me what exactly i want but its very difficult to use this again and again for more then 300 vendors. its good only for few data but currently the data is in more then one lakh rows.
Rows("1:1").Select
Selection.AutoFilter
ActiveSheet.Range("$A$1:$M$150000").AutoFilter Field:=9, Criteria1:= _
"CS Retail Pvt. Ltd"
Rows("2:2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("MakeFile").Select
Range("A2").Select
ActiveSheet.Paste
Cells.EntireColumn.AutoFit
Cells.EntireColumn.AutoFit
Cells.EntireRow.AutoFit
Cells.EntireRow.AutoFit
Rows("2:2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.RowHeight = 16
Range("A1").Select
Sheets("MakeFile").Select
Sheets("MakeFile").Copy
Sheets("MakeFile").Name = "MASTER PENDENCY 2012 ONWARDS"
Range("A1").Select
ActiveWorkbook.SaveAs Filename:= _
"C:\Users\ankit.jainaj\Desktop\Rohit\CS Retail Pvt. Ltd.xlsx", FileFormat _
:=xlOpenXMLWorkbook, CreateBackup:=False
ActiveWindow.Close
Rows("2:2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
Range("A2").Select
Therefore, I want if some can help me for coding of loop through which i can extract the data vendor wise and create a separate files with same vendor naming convention in different folder. if this work then i will get more then 300 separate files in different folder.
Please help me asap as its urgent.
Let me know in case if something is not clear.
Thanks.
Ankit Jain
Bookmarks