Sample Workbook.xlsx
I'm new to VBA and coding in general. I have tried to combine bits and pieces of others' code I found online to create a macro that will look through 3 different columns and if all the conditions exist, eliminate the row where all three conditions are true. (Condition 1 is C2= "Ready"; Condition 2 is H2 = "Clinical"; Condition 3 is D2 does not equal "Tech Start")
Below is the code I've currently got, but it isn't working.
Sub EliminateTechTesting()
'Identifies the Lines with clinical techs choosing any status other than tech start
Dim LR As Long, i As Long
LR = Range("C" & Rows.Count).End(xlUp).Row
LR = Range("D" & Rows.Count).End(xlUp).Row
LR = Range("H" & Rows.Count).End(xlUp).Row
For i = LR To 1 Step -1
If Range("C2" & i).Value = "Ready" And Range("H2" & i).Value = "Clinical" And Range("D2" & i).Value <> "Tech Start" Then Rows(i).Delete
Next i
End Sub
Any help would be very, very much appreciated.
Bookmarks