Sub air()
shoearr = Range(Range("Sheet2!C2"), Range("Sheet2!C2").End(xlDown))
lacearr = Array("White Shoe Laces", "Black Shoe Laces", "Yellow Shoe Laces", "Green Shoe Laces", "Brown Shoe Laces", "Blue Shoe Laces", "Red Shoe Laces")
specarr = Array("Air Jordan", "Kobe Bryant", "Pumps", "Shaqs", "Nike Air", "Long", "Full tongue")
For Each ce In Range("A2:A50")
arr = Split(ce.Value, " ")
'assumes year is only numeric in string
For i = LBound(arr) To UBound(arr)
If IsNumeric(arr(i)) Then[/COLOR] ce.Offset(0, 1).Value = arr(i)
Next i
'shoe type
For i = LBound(shoearr) To UBound(shoearr)
If InStr(1, ce, shoearr(i)) > 0 Then ce.Offset(0, 2).Value = shoearr(i)
Next i
'lace type
For i = LBound(lacearr) To UBound(lacearr)
If InStr(1, LCase(ce), LCase(lacearr(i))) > 0 Then ce.Offset(0, 3).Value = lacearr(i)
Next i
'special type
For i = LBound(specarr) To UBound(specarr)
If InStr(1, LCase(ce), LCase(specarr(i))) > 0 Then ce.Offset(0, 4).Value = specarr(i)
Next i
Next ce
End Sub
Bookmarks