Hi All Expert, please solve my query, i want Data Compiler from one workbook to another workbook.
*Noorain sir please look below code highlight range. how to fix this range.* Sub Compiler() Dim rng, rng1 As Range Dim i, j, k As Integer Set rng = Sheet1.Range("h1:h" & Sheet1.Range("h65536").End(xlUp).Row) rng.Copy Sheet1.Range("t1") Sheet1.Range("t1:t" & Sheet1.Range("t65536").End(xlUp).Row).Select Selection.RemoveDuplicates 1 For i = 2 To Sheet1.Range("t65536").End(xlUp).Row Workbooks.Add Sheet1.Range("A1:M1").Copy ActiveWorkbook.Sheets(1).Range("A1") ActiveWorkbook.SaveAs "D:\Data\CS Team\Resdex Report\Clients By Saleperson\New folder\" & Sheet1.Cells(i, "t") & ".xls" counter = 2 For j = 2 To Sheet1.Cells(Rows.Count, "A").End(xlUp).Row If Sheet1.Cells(j, "A").Value = Sheet1.Cells(i, "t").Value Then ActiveWorkbook.Sheets(1).Cells(counter, 1).Value = Sheet1.Cells(j, *1).Value* *ActiveWorkbook.Sheets(1).Cells(counter, 2).Value = Sheet1.Cells(j, 2).Value* *ActiveWorkbook.Sheets(1).Cells(counter, 3).Value = Sheet1.Cells(j, 3).Value* *ActiveWorkbook.Sheets(1).Cells(counter, 4).Value = Sheet1.Cells(j, 4).Value* *ActiveWorkbook.Sheets(1).Cells(counter, 5).Value = Sheet1.Cells(j, 5).Value* *ActiveWorkbook.Sheets(1).Cells(counter, 6).Value = Sheet1.Cells(j, 6).Value* *ActiveWorkbook.Sheets(1).Cells(counter, 7).Value = Sheet1.Cells(j, 7).Value* *ActiveWorkbook.Sheets(1).Cells(counter, 8).Value = Sheet1.Cells(j, 8).Value* *ActiveWorkbook.Sheets(1).Cells(counter, 9).Value = Sheet1.Cells(j, 9).Value* *ActiveWorkbook.Sheets(1).Cells(counter, 10).Value = Sheet1.Cells(j, 10).Value* *ActiveWorkbook.Sheets(1).Cells(counter, 11).Value = Sheet1.Cells(j, 11).Value* *ActiveWorkbook.Sheets(1).Cells(counter, 12).Value = Sheet1.Cells(j, 12).Value* *ActiveWorkbook.Sheets(1).Cells(counter, 13).Value = Sheet1.Cells(j, 13).Value* ActiveWorkbook.Sheets(1).Columns.AutoFit counter = counter + 1 End If Next j ActiveWorkbook.Save ActiveWorkbook.Close Next i End Sub -- Thanks & Regards Satendra Kumar -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It's =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 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) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout.