Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If your data does contain a valid number of columns, you can use this function:

Function myConcat(aStrings As Variant) As String
Dim i As Long, j As Long, sRes As String 
    sRes = ""
    For i = LBound(aStrings,1) To UBound(aStrings,1)
        For j = LBound(aStrings,2) To UBound(aStrings,2)
            If UCase(Left(aStrings(i,j),4)) <> "TIRE" _
                And UCase(Left(aStrings(i,j),11)) <> "PERFORMANCE" _ 
                And Trim(aStrings(i,j)) <> "" Then 
                    sRes = sRes & ", " & Trim(aStrings(i,j))
        Next j
    Next i
    If Len(sRes) > 2 Then sRes = Right(sRes, Len(sRes)-2)
    myConcat = sRes
End Function

Just write something like =MYCONCAT(A1:AX1) in the cell and get the result