Excel 2007 | ||||
---|---|---|---|---|
A | W | |||
1 | Title A | Title W | ||
2 | I am Well | |||
3 | I am not Well | |||
4 | Alive Well | |||
5 | I am Well | |||
6 | I am not Well | |||
7 | Alive Well | |||
8 | I am Well | |||
9 | Alive Well | |||
10 | I am Well | |||
11 | Alive Well | |||
12 | I am not Well | |||
13 | ||||
Sheet1 |
Excel 2007 | ||||
---|---|---|---|---|
A | W | |||
1 | Title A | Title W | ||
2 | I am Well | |||
3 | I am not Well | |||
4 | I am Well | |||
5 | I am not Well | |||
6 | I am Well | |||
7 | I am Well | |||
8 | I am not Well | |||
9 | ||||
10 | ||||
11 | ||||
12 | ||||
13 | ||||
Sheet1 |
Sub SiuGuy007()
' hiker95, 03/04/2016, ME300330
Columns("W").Replace "Alive Well", "#N/A", xlWhole
On Error Resume Next
Columns("W").SpecialCells(xlConstants, xlErrors).EntireRow.Delete
On Error GoTo 0
End Sub
Thanks again...I am a VBA newb, so please forgive me. I copied the Code and run it. Again, not changes to the spreadsheet. In column W, the text will be Alive/Well Check or Alive/Well Check, Activity Check.
When the code looks for the word does it have to be an exact match or if it find the 2 words, even if there are additional words, coma, slash etc?
Hiker95
Is there a way I could attach the excel sheet to show you?
Excel 2007 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | S | T | U | V | W | X | |||
1 | Case ID | Master Case ID | Case Status | Service | Days | Vendor | Vendor Type | OfficeID | Office | ||
2 | 396640 | 257222 | Case Completed | Alive/Well Check | 0.0 | NBA | GO | 37 | FW | ||
3 | 396721 | 257263 | Case Completed | Alive/Well Check | 0.0 | NBA | GO | 38 | SA | ||
4 | 396721 | 257263 | Case Completed | County Criminal History | 0.0 | NBA | GO | 38 | SA | ||
5 | 396721 | 257263 | Case Completed | County Civil Records | 0.0 | NBA | GO | 38 | SA | ||
6 | |||||||||||
ServRaw |
Excel 2007 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | S | T | U | V | W | X | |||
1 | Case ID | Master Case ID | Case Status | Service | Days | Vendor | Vendor Type | OfficeID | Office | ||
2 | 396721 | 257263 | Case Completed | County Criminal History | 0.0 | NBA | GO | 38 | SA | ||
3 | 396721 | 257263 | Case Completed | County Civil Records | 0.0 | NBA | GO | 38 | SA | ||
4 | |||||||||||
5 | |||||||||||
6 | |||||||||||
ServRaw |
Sub SiuGuy007_V2()
' hiker95, 03/04/2016, ME300330
Columns("S").Replace "Alive/Well*", "#N/A", xlWhole
On Error Resume Next
Columns("S").SpecialCells(xlConstants, xlErrors).EntireRow.Delete
On Error GoTo 0
End Sub