Thanks a lot NOORAIN I got it...........
On Thu, Apr 19, 2012 at 2:47 PM, NOORAIN ANSARI <noorain.ans...@gmail.com>wrote: > Dear Vijay, > > Please try below code to change folder path in red color... > See attached sheet.. > > Sub Spilit_in_Workbook() > Dim rng As Range > Dim i, j, c As Long > Dim wb As Workbook > Application.ScreenUpdating = False > Application.Calculation = xlCalculationManual > Set wb = ActiveWorkbook > Set rng = Sheet1.Range("E2:E" & Sheet1.Cells(Rows.Count, > "E").End(xlUp).Row) > rng.Select > Selection.AdvancedFilter Action:=xlFilterCopy, > copytoRange:=Sheet1.Range("O1"), Unique:=True > For i = 1 To Sheet1.Cells(Rows.Count, "O").End(xlUp).Row > Workbooks.Add > ActiveWorkbook.SaveAs "*D:\VBA_Class\*" & Sheet1.Cells(i, "O").Value & > ".xls" > wb.Sheets(1).Range("A1:H1").Copy ActiveWorkbook.Sheets(1).Cells(1, 1) > c = 2 > For j = 1 To Sheet1.Cells(Rows.Count, "E").End(xlUp).Row > If Sheet1.Cells(i, "O").Value = Sheet1.Cells(j, "E").Value Then > ActiveWorkbook.Sheets(1).Cells(c, 1).Value = wb.Sheets(1).Cells(j, 1).Value > ActiveWorkbook.Sheets(1).Cells(c, 2).Value = wb.Sheets(1).Cells(j, 2).Value > ActiveWorkbook.Sheets(1).Cells(c, 3).Value = wb.Sheets(1).Cells(j, 3).Value > ActiveWorkbook.Sheets(1).Cells(c, 4).Value = wb.Sheets(1).Cells(j, 4).Value > ActiveWorkbook.Sheets(1).Cells(c, 5).Value = wb.Sheets(1).Cells(j, 5).Value > ActiveWorkbook.Sheets(1).Cells(c, 6).Value = wb.Sheets(1).Cells(j, 6).Value > ActiveWorkbook.Sheets(1).Cells(c, 7).Value = wb.Sheets(1).Cells(j, 7).Value > ActiveWorkbook.Sheets(1).Cells(c, 8).Value = wb.Sheets(1).Cells(j, 8).Value > ActiveWorkbook.Sheets(1).Columns.AutoFit > c = c + 1 > End If > Next j > ActiveWorkbook.Save > ActiveWorkbook.Close > Next i > Sheet1.Range("O:O").ClearContents > Application.ScreenUpdating = True > Application.Calculation = xlCalculationAutomatic > > End Sub > -- > Thanks & regards, > Noorain Ansari > www.noorainansari.com > www.excelmacroworld.blogspot.com > > > On Wed, Apr 18, 2012 at 10:33 AM, Vijay Mane <levb...@gmail.com> wrote: > >> Hi Experts, >> >> pfa refer attachment >> >> Query ---- I want macro which will create different workbooks according >> to unique user column. and all workbooks will have name of user and >> their data respectively in same format >> >> Please help me. >> >> -- >> FORUM RULES (986+ members already BANNED for violation) >> >> 1) Use concise, accurate thread titles. Poor thread titles, like Please >> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice >> will not get quick attention or may not be answered. >> >> 2) Don't post a question in the thread of another member. >> >> 3) Don't post questions regarding breaking or bypassing any security >> measure. >> >> 4) Acknowledge the responses you receive, good or bad. >> >> 5) Cross-promotion of, or links to, forums competitive to this forum in >> signatures are prohibited. >> >> NOTE : Don't ever post personal or confidential data in a workbook. Forum >> owners and members are not responsible for any loss. >> >> >> ------------------------------------------------------------------------------------------------------ >> To post to this group, send email to excel-macros@googlegroups.com >> > > > > > > > > -- > FORUM RULES (986+ members already BANNED for violation) > > 1) Use concise, accurate thread titles. Poor thread titles, like Please > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice > will not get quick attention or may not be answered. > > 2) Don't post a question in the thread of another member. > > 3) Don't post questions regarding breaking or bypassing any security > measure. > > 4) Acknowledge the responses you receive, good or bad. > > 5) Cross-promotion of, or links to, forums competitive to this forum in > signatures are prohibited. > > NOTE : Don't ever post personal or confidential data in a workbook. Forum > owners and members are not responsible for any loss. > > > ------------------------------------------------------------------------------------------------------ > To post to this group, send email to excel-macros@googlegroups.com > -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com