I want to delete in excel sheet after filter.All records delete except first row.but when I try to run this I getting this error as mention in attachment.I try to run this in uipath but got error in excel may be as mention in attachment untitle.png not select second row first column.
How can I select all rows except first row.
@Palaniyappan
ImPratham45
(Prathamesh Patil)
February 6, 2020, 1:04pm
2
You want to remove all records except for headers ryt??
try this
Sub Macro5()
Rows("2:30000").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
End Sub
or for filtered data
Sub Macro7()
Rows("1:1").Select
Selection.Offset(1, 0).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Delete Shift:=xlUp
End Sub
no except first row and header also
ImPratham45
(Prathamesh Patil)
February 6, 2020, 1:13pm
4
Sub Mac()
Rows("2:30000").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
End Sub
Code will remove data from 2nd row u can set n number for rows
ok thanks but you mention this
Rows(“2:30000”).Select this range…??
ImPratham45
(Prathamesh Patil)
February 6, 2020, 1:17pm
6
I have idea that i dont have data more than 30000 so i have ryt that range u can use upto last row i.e. 1048576
ImPratham45
(Prathamesh Patil)
February 7, 2020, 4:08am
11
You want to delete filtered data only?