I'm curious, is there a "smarter" way to code this? It works, but it's lengthy so I'm wondering if there's a better way.
VBA Code:
For i = 2 To WDLR
If Range("AP" & i).Value = "DS | Purple | N" Then
Range("AQ" & i).Value = "N/A"
Range("AR" & i).Value = "2"
Range("AS" & i).Value = "N3"
Range("AT" & i).Value = "Y"
Range("AU" & i).Value = "Y"
Range("AV" & i).Value = Range("J" & i).Value
Range("AW" & i).Value = "N/A"
Range("AX" & i).Value = "N/A"
Range("AY" & i).Value = "E"
Range("AZ" & i).Value = "E"
ElseIf Range("AP" & i).Value = "DS | Purple | Y" Then
Range("AQ" & i).Value = "N/A"
Range("AR" & i).Value = "0"
Range("AS" & i).Value = "I3"
Range("AT" & i).Value = "NULL"
Range("AU" & i).Value = "R"
Range("AV" & i).Value = Range("J" & i).Value
Range("AW" & i).Value = "N/A"
Range("AX" & i).Value = "N/A"
Range("AY" & i).Value = "No Update"
Range("AZ" & i).Value = "No Update"
ElseIf Range("AP" & i).Value = "DS | Green | N" Then
Range("AQ" & i).Value = "0"
Range("AR" & i).Value = "2"
Range("AS" & i).Value = "N3"
Range("AT" & i).Value = "Y"
Range("AU" & i).Value = "N/A"
Range("AV" & i).Value = "N/A"
Range("AW" & i).Value = "11"
Range("AX" & i).Value = Range("J" & i).Value
Range("AY" & i).Value = "F"
Range("AZ" & i).Value = "F"
ElseIf Range("AP" & i).Value = "DS | Green | Y" Then
Range("AQ" & i).Value = "0"
Range("AR" & i).Value = "0"
Range("AS" & i).Value = "I3"
Range("AT" & i).Value = "NULL"
Range("AU" & i).Value = "N/A"
Range("AV" & i).Value = "N/A"
Range("AW" & i).Value = "11"
Range("AX" & i).Value = Range("J" & i).Value
Range("AY" & i).Value = "No Update"
Range("AZ" & i).Value = "No Update"
ElseIf Range("AP" & i).Value = "DS | Yellow | N" Then
Range("AQ" & i).Value = "0"
Range("AR" & i).Value = "2"
Range("AS" & i).Value = "N3"
Range("AT" & i).Value = "Y"
Range("AU" & i).Value = "N/A"
Range("AV" & i).Value = "N/A"
Range("AW" & i).Value = "12"
Range("AX" & i).Value = Range("J" & i).Value
Range("AY" & i).Value = "G"
Range("AZ" & i).Value = "G"
ElseIf Range("AP" & i).Value = "DS | Yellow | Y" Then
Range("AQ" & i).Value = "0"
Range("AR" & i).Value = "0"
Range("AS" & i).Value = "I3"
Range("AT" & i).Value = "NULL"
Range("AU" & i).Value = "N/A"
Range("AV" & i).Value = "N/A"
Range("AW" & i).Value = "12"
Range("AX" & i).Value = Range("J" & i).Value
Range("AY" & i).Value = "No Update"
Range("AZ" & i).Value = "No Update"
ElseIf Range("AP" & i).Value = "DS | Blue | N" Then
Range("AQ" & i).Value = "0"
Range("AR" & i).Value = "2"
Range("AS" & i).Value = "N3"
Range("AT" & i).Value = "Y"
Range("AU" & i).Value = "N/A"
Range("AV" & i).Value = "N/A"
Range("AW" & i).Value = "13"
Range("AX" & i).Value = Range("J" & i).Value
Range("AY" & i).Value = "H"
Range("AZ" & i).Value = "H"
ElseIf Range("AP" & i).Value = "DS | Blue | Y" Then
Range("AQ" & i).Value = "0"
Range("AR" & i).Value = "0"
Range("AS" & i).Value = "I3"
Range("AT" & i).Value = "NULL"
Range("AU" & i).Value = "N/A"
Range("AV" & i).Value = "N/A"
Range("AW" & i).Value = "13"
Range("AX" & i).Value = Range("J" & i).Value
Range("AY" & i).Value = "No Update"
Range("AZ" & i).Value = "No Update"
End If
Next i