I gave this coding thing a stab and came up with this code
Sub promo()
Dim LastRow As Long, i As Long, ii As Long
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
For i = LastRow To 2 Step -1
If Cells(i, "E").Value = "A" And Cells(i, "L").Value = "Incorrect creative/correct car" And Cells(i, "A").Value = "B" Then
Cells(i, "N") = "C" And Cells(i, "M") = "D"
End If
unfortunately, I get an error "type mismatch" and choosing the debug option directs me to this line:
Cells(i, "N") = "C" And Cells(i, "M") = "D"
Oh, with the help of a friend I figured out what happened:
"and" generally can't be placed in anything within a "then" statement. Instead I should've followed this syntax:
Cells(i, "N") = "C"
Cells(i, "M") = "D"
mods: feel free to delete this if this knowledge is too basic. I don't know a lick of this coding business and made an easy goof. Thanks.
Bookmarks