Maybe not. lol.
Just getting #/Value. Any suggestions.
Function ConcatTextAll(rng As Range, MatchVal As String, UpOrOver As String, WhichPosition As String) As String
Dim RetVal As String
Dim cCell As Range
Dim RefPosition As Long
Dim NameOfPosition As String
Dim UpOrOver As String
Dim WhichPosition As String
MatchVal = UCase(MatchVal)
RetVal = ""
If UpOrOver = "O" Or "U" Then
If UpOrOver = "U" Then
For Each cCell In rng
If UCase(cCell.Text) = MatchVal Then
RefPosition = cCell.Row
NameOfPosition = cCell.Offset(RowOffset:=-RefPosition + WhichPosition).Text
If NameOfPosition <> "0" Then
RetVal = RetVal & NameOfPosition & " | "
End If
End If
Next cCell
End If
If UpOrOver = "O" Then
If UCase(cCell.Text) = MatchVal Then
RefPosition = cCell.Column
NameOfPosition = cCell.Offset(ColumnOffset:=-RefPosition + WhichPosition).Text
If NameOfPosition <> "0" Then
RetVal = RetVal & NameOfPosition & " | "
End If
End If
Next cCell
End If
End If
If RetVal <> "" Then
ConcatTextAll = Left(RetVal, Len(RetVal) - 3)
Else
ConcatTextAll = "None"
End If
End Function
Bookmarks