This piece of code will never get true:
If Range("AY" & i).Value = "1478" and "1476" Then
A cell can not have both values in the same time! By the way: why do you think that value is string based?
[
EDIT#1]
I'd change multiple
If
's into
Select Case[
^]:
Select Case Range("AY" & i).Value
Case 1476, 1478
Range("BL" & i).Value = " XYZ "
Case 1589, 1595
Range("BL" & i).Value = "ABC"
Case 484, 1447, 1695
Range("BL" & i).Value = "XZ"
Case 1447
Range("BM" & i).Value = "AZ"
Range("BL" & i).Value = "SPT"
End Select
which is equivalent to:
If Range("AY" & i).Value = 1478 OR Range("AY" & i).Value = 1476 Then
Range("BL" & i).Value = " XYZ "
End If
Do you see the difference?
[
EDIT#2]
Another way is to use
Dictionary object[
^].
Dim myDictionary As Dictionary
Set myDictionary = New Dictionary
With myDictionary
.Add 1476, "XYZ"
.Add 1478, "XYZ"
.Add 1589, "ABC"
.Add 1595, "ABC"
End With
For i = 2 To LastRow
Range("BL" & i).Value = myDictionary(Range("AY" & i).Value)
Next