Excel vertical search, Multiple results per id
My question is about vertical search excel.
I would like to want to link IDs and user names that appear in a cell. Only these IDs / numbers associated with multiple user names.
At this moment I am where I get 1 per user id, but I would like to thank all the user names to get in 1 cell. My question is: Is this possible and if so how?
Thanks.
Re: Excel vertical search, Multiple results per id
try this
Public Function vlookupall$(strSearch As String, rngRange As Range, lngLookupCol As Long)
'Vlookupall searches in first column of rngRange for strSearch and returns corresponding
'values of column lngLookupCol if strSearch was found. All corr. values are collected and
'returned in one string (result of function).
Dim i As Long
If lngLookupCol > rngRange.Columns.Count Then
vlookupall = CVErr(xlErrValue)
Exit Function
End If
vlookupall = ""
For i = 1 To rngRange.Rows.Count
If rngRange(i, 1).Text = strSearch Then
vlookupall = vlookupall & rngRange(i, lngLookupCol).Text & "; "
End If
Next i
End Function
Re: Excel vertical search, Multiple results per id
Re: Excel vertical search, Multiple results per id
Use this function on an acct number in your table, =ISNUMBER(A1). If it is a true value/number then the function will return TRUE. If not then it returns FALSE. Then use your CONCATENATE part of your formula to get just the combination of the numbers you are putting together to "build" an acct number and put that in a cell by itself, like B1. Then use =ISNUMBER(B1). If it returns FALSE then you will see the problem. VLOOKUP needs both to be the same so it can find what it is looking for.
Also, you don't need to use the CONCATENATE function at all. You can just use =A1&B1&C1, for example. And finally I have many suggestions to make your file smaller and thus calculate faster and open and save faster as well.