Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,570
- Office Version
- 365
- 2016
- Platform
- Windows
I have a worksheet (schedule.csv) that I wish to remove all rows of data with the exception of those in which the value in column M = variable value usr_date.
The worksheet alias is ws_schedule
I wish to delete all the rows with the exception of those in which the value in column n = usr_date (19-06-19). My data has no header row
Can anyone help me with a vba solution for this?
I have this so far, but the autofilter isn't working. It comes up with no rows revealed...
The worksheet alias is ws_schedule
I wish to delete all the rows with the exception of those in which the value in column n = usr_date (19-06-19). My data has no header row
Can anyone help me with a vba solution for this?
I have this so far, but the autofilter isn't working. It comes up with no rows revealed...
Code:
With ws_schedule
.AutoFilterMode = False
.Rows(1).Insert shift:=xlDown
.Range("A1:Z1").AutoFilter
.Range("A1:Z1").AutoFilter Field:=13, Criteria1: <> usr_date
End With
Last edited: