Hi All
is there way of combining these two Macros into one Please ? they run in this sequence,
Thank you
Sub IfArgument()
Dim lastRow As Long, i As Long
Dim ws As Worksheet
Set ws = Sheets(""Sheet1"")
lastRow = ws.Range(""A"" & Rows.Count).End(xlUp).Row
With ws
For i = 1 To lastRow
If Cells(i, 4).Value = "Hire"Then
Cells(i, 6).Value = ""Band1""
ElseIf Cells(i, 4).Value = "Lease" Then
Cells(i, 6).Value = "Band2"
ElseIf Cells(i, 4).Value = "cash" And Cells(i, 3).Value = "Tango" Then
Cells(i, 6).Value = "Band3"
ElseIf Cells(i, 4).Value = "Credit" And Cells(i, 3).Value = "Tango" Then
Cells(i, 6).Value = "Band4"
ElseIf Cells(i, 4).Value = "cash" And Cells(i, 3).Value = "Mango" Then
Cells(i, 6).Value = "Band5"
ElseIf Cells(i, 4).Value = "Credit" And Cells(i, 3).Value = "Tango" Then
Cells(i, 6).Value = "Band6"
End If
Next i
End With
End Sub
SubVlookupArgument()
Range("I2:I500000").Formula = "=VLOOKUP(A2, Sheet2!A1:H12, RIGHT(F2)+1, FALSE)"
Bookmarks