Code:
Sub SwapperTEST()
ActiveWorkbook.Sheets(1).Activate
Dim cell As Range
Dim v1 As String, v2 As String, id1 As String, id2 As String
For Each cell In Range("F:F")
If cell.Value = "Vendor A" And cell.Offset(0, -1) > 1 Then
v1 = cell.Offset(0, -2).Value
v2 = cell.Offset(1, -2).Value
cell.Offset(0, -2).Value = v2
cell.Offset(1, -2).Value = v1
id1 = cell.Offset(0, -1).Value
id2 = cell.Offset(1, -1).Value
cell.Offset(0, -1).Value = id2
cell.Offset(1, -1).Value = id1
End If
Next cell
End Sub
How can I add the following additional criteria to the above code.
If cell.Value = "Vendor A" And cell.Offset(0, -1) > 1 Then
If cell.Value = "Vendor B" And cell.Offset(0, -1) > 1 Then
If cell.Value = "Vendor C" And cell.Offset(0, -1) > 1 Then