lRow = Range("B" & Rows.Count).End(xlUp).Row
For l = 1 To lRow
Begins to loop through all rows
For Each cel In Range("B" & l & ":G" & l)
loops through B:G in a row
If cel.Value <> "" Then
x = x + 1
End If
Counts each cell in B:G that is not empty
If x = 6 Then
Range("A" & l).Value = Range("B" & l).Value & " " & Range("E" & l).Value & " " & Range("G" & l).Value
If none are empty in concatenates these values.
Else:
Range("A" & l).Value = Range("B" & l).Value & " " & Range("C" & l).Value & " " & Range("D" & l).Value
Else if some are empty it concatenates these cells.
Bookmarks