Hi Avit its not working at Auto Filter stage .ITs showing blank Sheet1.Range("A1:P1").AutoFilter Field:=1, Criteria1:=Sheet1.Range("V" & LoopCounter).Value
@@avitguru It's working already. In your code I changed the auto filter to 1 instead of 2. Thank you. Anyway.. do you have tutorial on how to split directly to multiple files instead of multiple worksheet?
Hi Avit, the video is very much useful. Thanks for that.. i have a question, in case If there are some cells are blank ... In that case will macro work ...?
@@avitguru thanks for the prompt response... My doubt is, while macro creating unique value and splitting data to respective sheet ... In few of the lines are blank then will it skip those blank cells and take entire row data...?
Sir, why do I have this error. "Name argument not found" "CRITERIAL":=Sheet1.Range("L" & Loopcounter).Value. can any answer quickly please. I will appreciate it. thanks
Sir review tab me share workbook karne ne bad ye Error aa jata hai- "run time error '1004' Advancedfilter method of Range class failed" , sir please help
Hi Sir, Video is great and easy to understand. Thanks! I have serial number as column in my Master sheet. Is there any way to make the serial number start from 1 after splitting the Master data?
I am getting error- you typed invalid name of sheet or chart. 1. The name you type doesn't exceed 31 characters 2. You did not leave the name blank. Before this part my code is working fine. I used column P for storing unique values.
Hello, 1. Ye line me Filed:=5 (Is it Row number or Column number)? Sheets("Data").Range("A1:J1").AutoFilter Field:=5, Criteria1:=Sheets("Data").Range("R" & LoopCounter).Value 2. And Sheets create hua hai but data copy paste nahi ho raha hai except headers. Below is the coding. Please help. Sub Split() Workbooks("ZADJUST.xlsm").Sheets("Data").Activate Dim iRow As Integer Dim Rng As Range Dim LoopCounter As Integer iRow = Sheets("Data").Cells(Rows.Count, "I").End(xlUp).Row Set Rng = Sheets("Data").Range("I1:I" & iRow) Rng.AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Sheets("Data").Range("R1"), Unique:=True For LoopCounter = 2 To Sheets("Data").Cells(Rows.Count, "R").End(xlUp).Row Sheets("Data").Range("A1:J1").AutoFilter Field:=5, Criteria1:=Sheets("Data").Range("R" & LoopCounter).Value Sheets.Add After:=Sheets(Sheets.Count) Sheets(Sheets.Count).Name = Sheets("Data").Range("R" & LoopCounter).Value Sheets("Data").Range("A1").CurrentRegion.SpecialCells(xlCellTypeVisible).Copy Sheets(Sheets.Count).Range("A1").PasteSpecial xlPasteAll Application.CutCopyMode = False Next LoopCounter Sheets("Data").AutoFilterMode = False End Sub
Sub fileopen() Dim My_file As String Dim iRow As Integer Dim Rng As Range Dim LoopCounter As Integer iRow = Sheet1.Cells(Rows.Count, "B").End(xlUp).Row My_file = Application.GetOpenFilename() Worksheets("Sheet1").Range("J3").Value = My_file Workbooks.Open My_file Set Rng = Sheet1.Range("B1:B" & iRow) 'here I am getting run time error from Rng.advanced. Rng.AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Sheet1.Range("BA1"), Unique:=True For LoopCounter = 2 To Sheet1.Cells(Rows.Count, "BA").End(xlUp).Row Sheet1.Range("A1:AQ1").AutoFilter Field:=2, Criteria1:=Sheet1.Range("BA" & LoopCounter).Value Sheets.Add After:=Sheets(Sheets.Count) Sheets(Sheets.Count).Name = Sheet1.Range("BA" & LoopCounter).Value Sheet1.Range("A1").CurrentRegion.SpecialCells(xlCellTypeVisible).Copy Sheets(Sheets.Count).Range("A1").PasteSpecial xlPasteAll Application.CutCopyMode = False Next LoopCounter Sheet1.AutoFilterMode = False 'Select all sheets Dim myArray() As Variant Dim i As Integer For i = 1 To Sheets.Count ReDim Preserve myArray(i - 1) myArray(i - 1) = i Next i Sheets(myArray).Select Cells.Select Cells.EntireColumn.AutoFit Columns("B").EntireColumn.Delete Columns("AZ").EntireColumn.Delete Sheet1.Delete Application.DisplayAlerts = True MsgBox ("All Sheets has been created") End Sub
@@avitguru Hello sir I don't want file path.. see I M getting error in below code.. Sub fileopen() Dim My_file As String Dim iRow As Integer Dim Rng As Range Dim LoopCounter As Integer iRow = Sheet1.Cells(Rows.Count, "B").End(xlUp).Row My_file = Application.GetOpenFilename() Workbooks.Open My_file Set Rng = Sheet1.Range("B1:B" & iRow) *****'Geting error from below code.******* Just want to open excel file and run your macro.. Actual code should be in different Excel workbook. Rng.AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Sheet1.Range("BA1"), Unique:=True For LoopCounter = 2 To Sheet1.Cells(Rows.Count, "BA").End(xlUp).Row Sheet1.Range("A1:AQ1").AutoFilter Field:=2, Criteria1:=Sheet1.Range("BA" & LoopCounter).Value Sheets.Add After:=Sheets(Sheets.Count) Sheets(Sheets.Count).Name = Sheet1.Range("BA" & LoopCounter).Value Sheet1.Range("A1").CurrentRegion.SpecialCells(xlCellTypeVisible).Copy Sheets(Sheets.Count).Range("A1").PasteSpecial xlPasteAll Application.CutCopyMode = False Next LoopCounter Sheet1.AutoFilterMode = False 'Select all sheets Dim myArray() As Variant Dim i As Integer For i = 1 To Sheets.Count ReDim Preserve myArray(i - 1) myArray(i - 1) = i Next i Sheets(myArray).Select Cells.Select Cells.EntireColumn.AutoFit Columns("B").EntireColumn.Delete Columns("AZ").EntireColumn.Delete Sheet1.Delete Application.DisplayAlerts = True MsgBox ("All Sheets has been created") End Sub
Excellent explanation. Made it vey simple for all leaners
Thank you🙏 I was looking for this macro to save time and you have explained it very well..
Hi Avit its not working at Auto Filter stage .ITs showing blank
Sheet1.Range("A1:P1").AutoFilter Field:=1, Criteria1:=Sheet1.Range("V" & LoopCounter).Value
This is brilliant.... Made my life very easy. Thanks a lot for the video.....
Fantastic bhai
Very good. Easy Explain.👍👍👍
Sir apki all video achhi hai, maine channel ko subscribe kar diya hai.
Main all video dekhunga.
I've used the macro but it seems it's counting all the cells in excel. It generated all sheets needed but no data
Can you share your code.
@@avitguru It's working already. In your code I changed the auto filter to 1 instead of 2. Thank you. Anyway.. do you have tutorial on how to split directly to multiple files instead of multiple worksheet?
@@meditatereflect3354 yes I have
th-cam.com/video/KMW45AwK44c/w-d-xo.html
@@avitguru Thank you!
Sir agar hum mastersheet me city add kare to us city ke namke worksheet me data chal jayega kya
Yes
Thanks
Sir why it is copying only 1st column in my code.
Hi Avit, the video is very much useful. Thanks for that.. i have a question, in case If there are some cells are blank ... In that case will macro work ...?
Yes, but we need to verify our output.
@@avitguru thanks for the prompt response... My doubt is, while macro creating unique value and splitting data to respective sheet ... In few of the lines are blank then will it skip those blank cells and take entire row data...?
@@Omshanthiom9 if entire row is blank then macro will skip those rows.
@@avitguru not entire row, few cells here and there are blank...?
@@Omshanthiom9 then it will not skip
Sir, why do I have this error. "Name argument not found" "CRITERIAL":=Sheet1.Range("L" & Loopcounter).Value. can any answer quickly please. I will appreciate it. thanks
Write Criteria1 instead of CRITERIAL
Sir review tab me share workbook karne ne bad ye Error aa jata hai- "run time error '1004' Advancedfilter method of Range class failed" , sir please help
Code share Kar sakte ho kya
Video is very useful.. thanks for this.
Hi Sir, Video is great and easy to understand. Thanks!
I have serial number as column in my Master sheet. Is there any way to make the serial number start from 1 after splitting the Master data?
Yes, I will give you code tomorrow
Thanks bruh worked for me
very good
It's very helpful. Can you help me to send mail on outlook data which is split in different worksheets
I am getting runtime error 1004 in 11th line.
Please help to solve this
Please send code line where you get an error
Sheets(sheets.count).Name = Sheet1.Range("P" & LoopCounter).Value
I am getting error- you typed invalid name of sheet or chart.
1. The name you type doesn't exceed 31 characters
2. You did not leave the name blank.
Before this part my code is working fine. I used column P for storing unique values.
@@nehasaini755 we cannot rename sheet with more than 31 characters or variable may be blank.
Hello Sir,
Thank you for the Video
Can we talk about Some Other types of data kindly share your content Deatils please
Thanks for the great vdo❤️
Can u paste coding here
you can give me your email id. i will send to you file.
@@avitguru in this every time he add sheets i want if sheet there (check sheet name ) only paste data
mail me patidarrohit@gmail.com
Thanks bro it helped me a lot
nice
Can u please share the code
Give me your email I will share the fill
Mujhe ak error araha hai :named argument not found 🙄
plz send me syntax
@@avitguru thanks for your reply .
I fixed that issue and now its working fine ..😁
@@manaswinisahoo4555 👍
Dear Sir , thank you, could you please give me a simple solution to split a file per number of lines, for example 200 ,300 500 lines.
Okay, I will make video for this
@@avitguru sir im waiting for this video
Plz share code
Wonderful video! Can you please share the code via email?
Sure.
If it is hindi video. Mention it is Hindi in the title. I have given dislike ...
Many youtuber mentioned english title of the Hindi video.
Hello,
1. Ye line me Filed:=5 (Is it Row number or Column number)?
Sheets("Data").Range("A1:J1").AutoFilter Field:=5, Criteria1:=Sheets("Data").Range("R" & LoopCounter).Value
2. And Sheets create hua hai but data copy paste nahi ho raha hai except headers. Below is the coding. Please help.
Sub Split()
Workbooks("ZADJUST.xlsm").Sheets("Data").Activate
Dim iRow As Integer
Dim Rng As Range
Dim LoopCounter As Integer
iRow = Sheets("Data").Cells(Rows.Count, "I").End(xlUp).Row
Set Rng = Sheets("Data").Range("I1:I" & iRow)
Rng.AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Sheets("Data").Range("R1"), Unique:=True
For LoopCounter = 2 To Sheets("Data").Cells(Rows.Count, "R").End(xlUp).Row
Sheets("Data").Range("A1:J1").AutoFilter Field:=5, Criteria1:=Sheets("Data").Range("R" & LoopCounter).Value
Sheets.Add After:=Sheets(Sheets.Count)
Sheets(Sheets.Count).Name = Sheets("Data").Range("R" & LoopCounter).Value
Sheets("Data").Range("A1").CurrentRegion.SpecialCells(xlCellTypeVisible).Copy
Sheets(Sheets.Count).Range("A1").PasteSpecial xlPasteAll
Application.CutCopyMode = False
Next LoopCounter
Sheets("Data").AutoFilterMode = False
End Sub
Field=5 is a header position of data, means it is a column
Thanks and mera data copy paste nahi ho raha hai except header.... please refer the coding
@@jayeshs6618 can you call me.
My mobile number is in my website.
Sub fileopen()
Dim My_file As String
Dim iRow As Integer
Dim Rng As Range
Dim LoopCounter As Integer
iRow = Sheet1.Cells(Rows.Count, "B").End(xlUp).Row
My_file = Application.GetOpenFilename()
Worksheets("Sheet1").Range("J3").Value = My_file
Workbooks.Open My_file
Set Rng = Sheet1.Range("B1:B" & iRow)
'here I am getting run time error from Rng.advanced.
Rng.AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Sheet1.Range("BA1"), Unique:=True
For LoopCounter = 2 To Sheet1.Cells(Rows.Count, "BA").End(xlUp).Row
Sheet1.Range("A1:AQ1").AutoFilter Field:=2, Criteria1:=Sheet1.Range("BA" & LoopCounter).Value
Sheets.Add After:=Sheets(Sheets.Count)
Sheets(Sheets.Count).Name = Sheet1.Range("BA" & LoopCounter).Value
Sheet1.Range("A1").CurrentRegion.SpecialCells(xlCellTypeVisible).Copy
Sheets(Sheets.Count).Range("A1").PasteSpecial xlPasteAll
Application.CutCopyMode = False
Next LoopCounter
Sheet1.AutoFilterMode = False
'Select all sheets
Dim myArray() As Variant
Dim i As Integer
For i = 1 To Sheets.Count
ReDim Preserve myArray(i - 1)
myArray(i - 1) = i
Next i
Sheets(myArray).Select
Cells.Select
Cells.EntireColumn.AutoFit
Columns("B").EntireColumn.Delete
Columns("AZ").EntireColumn.Delete
Sheet1.Delete
Application.DisplayAlerts = True
MsgBox ("All Sheets has been created")
End Sub
th-cam.com/video/NF3hW5M_0yo/w-d-xo.html
Isme use Kiya hai maine
@@avitguru Hello sir I don't want file path.. see I M getting error in below code..
Sub fileopen()
Dim My_file As String
Dim iRow As Integer
Dim Rng As Range
Dim LoopCounter As Integer
iRow = Sheet1.Cells(Rows.Count, "B").End(xlUp).Row
My_file = Application.GetOpenFilename()
Workbooks.Open My_file
Set Rng = Sheet1.Range("B1:B" & iRow)
*****'Geting error from below code.*******
Just want to open excel file and run your macro..
Actual code should be in different Excel workbook.
Rng.AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Sheet1.Range("BA1"), Unique:=True
For LoopCounter = 2 To Sheet1.Cells(Rows.Count, "BA").End(xlUp).Row
Sheet1.Range("A1:AQ1").AutoFilter Field:=2, Criteria1:=Sheet1.Range("BA" & LoopCounter).Value
Sheets.Add After:=Sheets(Sheets.Count)
Sheets(Sheets.Count).Name = Sheet1.Range("BA" & LoopCounter).Value
Sheet1.Range("A1").CurrentRegion.SpecialCells(xlCellTypeVisible).Copy
Sheets(Sheets.Count).Range("A1").PasteSpecial xlPasteAll
Application.CutCopyMode = False
Next LoopCounter
Sheet1.AutoFilterMode = False
'Select all sheets
Dim myArray() As Variant
Dim i As Integer
For i = 1 To Sheets.Count
ReDim Preserve myArray(i - 1)
myArray(i - 1) = i
Next i
Sheets(myArray).Select
Cells.Select
Cells.EntireColumn.AutoFit
Columns("B").EntireColumn.Delete
Columns("AZ").EntireColumn.Delete
Sheet1.Delete
Application.DisplayAlerts = True
MsgBox ("All Sheets has been created")
End Sub