Here, I've added an array of MyStrings at the top, just put in all the strings you want to add "10" to when they match the 1030-1060 Term.
Option Explicit
Sub Condense()
'JBeaucaire (10/7/2009) Merge customer order lines
Dim LR As Long, i As Long, Trm As Long, Prod As Long, cNum As Long
Dim s As Long, MyStrings
Application.ScreenUpdating = False
MyStrings = Array("AB3", "ZZ99")
Trm = Rows(1).Find("Term").Column
Prod = Rows(1).Find("Product").Column
cNum = Rows(1).Find("Customer Number").Column
LR = Range("A" & Rows.Count).End(xlUp).Row
For i = LR To 3 Step -1
If Cells(i, cNum) = Cells(i - 1, cNum) Then
If Cells(i, Trm) >= "1030" And Cells(i, Trm) <= "1060" Then
For s = 0 To UBound(MyStrings)
If Cells(i, Prod) = MyStrings(s) Then Cells(i, Prod) = MyStrings(s) & "10"
If Cells(i - 1, Prod) = MyStrings(s) Then Cells(i - 1, Prod) = MyStrings(s) & "10"
Next s
End If
Cells(i - 1, Prod) = Cells(i - 1, Prod) & ", " & Cells(i, Prod)
Rows(i).Delete xlShiftUp
End If
Next i
Cells.Columns.AutoFit
Application.ScreenUpdating = True
End Sub
Bookmarks