Hello Everyone - I am trying to produce a loop that loops through a vertical columm picking up the cells string that starts with "AGL" and puting an "&" on the end and untill it reaches a blank column. The best i have come up with is but not working, can anyone help?
Sub FindNum()
Dim strNumb As String
Dim lastrow As String
lastrow = ActiveSheet.UsedRange.Rows.Count
For Each cell In ActiveSheet.Range("K6:K" & lastrow)
If cell(Left(cell, 1) = "EGL") Then
If strNumb = "" Then
strNumb = cell.Offset(0, 1)
Else
strNumb = strNumb & "&" & cell.Offset(0, 1)
End If
End If
Next
End Sub
can anyone help please
thanks
Jay
Bookmarks