I have some data in one sheet of excel. From that I want to find certain particular value from a column and then copy that row of value in new sheet.I there are multiple values in a column,then it will copy all those value. For Example in the image below. I want to find 409539 and all the rows corresponding to these values will be pasted in next sheet. I am using Excel Vba and used below code for reference but i am getting some error
For Each c In rngSearch
If c.Value = SearchRange Then
For Each K In ActiveWorkbook.Sheets("Search").Range("1:10")
If K.Value = "" Then
ActiveWorkbook.Sheets("Search").K.Value = c.Value
End If
Next K
Replace = c.Offset(0, 5).Value
ActiveWorkbook.Sheets("Search").Range("B2").Value = Replace
End If
Next c