Originally Posted by
krishhi
Hi there,
Can anyone solve this probelm
I have a data in two columns that is "A" and "B". In "A" i have task numbers like,
00526
00568
25688
00569
00585
00585
00569
00569
00569
25688
25689
In "B" i have Description of the task numbers.
Here i want the description of the Same task numbers into Column "C".
for example, see above, the task number "00585" and "00569" has duplicate entry under the first one then i need the description of the second one into "C" column with first One.
and in another case, see the task number "25688" also has duplicate but i don't want that data to combine. because the sequence is not under the first one.
I think you got my point.? if not find the image what i want.
Any help on this situation?
Thanks in Advance,
Krrish
You can use this UDF:
Function MyLookUp(rLook, rng As Range, nColumn As Long)
Dim rCell As Range, Result
MyLookUp = CVErr(xlErrNA)
For Each rCell In rng
If rCell = rLook Then
Result = Result & ", " & rCell.Offset(, nColumn - 1)
End If
Next rCell
If Result <> "" Then
Result = Right(Result, Len(Result) - 1)
MyLookUp = Result
End If
End Function
Pls see att. file