Sub fifo()
With ActiveSheet
fin = .Range("A" & .Rows.Count).End(xlUp).Row
tabdata = .Range("A2:D" & fin).Value
For i = LBound(tabdata, 1) To UBound(tabdata, 1)
For j = LBound(tabdata, 1) To UBound(tabdata, 1)
If i = j Then
Else
If tabdata(j, 2) >= tabdata(i, 2) And tabdata(j, 1) <= tabdata(i, 1) Then
tabdata(i, 4) = "Not FIFO"
End If
End If
Next j
Next i
.Range("A2").Resize(UBound(tabdata, 1), UBound(tabdata, 2)) = tabdata
End With
End Sub