ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Vlookup and combine all references (https://www.excelbanter.com/excel-discussion-misc-queries/259913-vlookup-combine-all-references.html)

BeckyB

Vlookup and combine all references
 
I have various items in a spreadsheet. Some of these items are repeated in
another row, but have a different text description for it. They all have the
same reference number, just a different description. I want to combine all
the descriptions into one cell. I am doing vlookup, but it is only putting in
the first occurance. Can I combine all occurances into one?

JB

Vlookup and combine all references
 
UDF:

=rechtous(Value;RangeValue;RangeReturn)

Function RechTous(v, champRech As Range, ChampRetour As Range)
a = champRech
temp = ""
For i = 1 To champRech.Count
If a(i, 1) = v Then
temp = temp & ChampRetour(i) & " "
End If
Next i
RechTous = temp
End Function

http://boisgontierjacques.free.fr/fi...hercheTous.xls

JB


On 25 mar, 20:35, BeckyB wrote:
I have various items in a spreadsheet. Some of these items are repeated in
another row, but have a different text description for it. They all have the
same reference number, just a different description. I want to combine all
the descriptions into one cell. I am doing vlookup, but it is only putting in
the first occurance. Can I combine all occurances into one?



BeckyB

Vlookup and combine all references
 
Thanks for your reply, but I have really no idea what the below is. Please
advise.


"JB" wrote:

UDF:

=rechtous(Value;RangeValue;RangeReturn)

Function RechTous(v, champRech As Range, ChampRetour As Range)
a = champRech
temp = ""
For i = 1 To champRech.Count
If a(i, 1) = v Then
temp = temp & ChampRetour(i) & " "
End If
Next i
RechTous = temp
End Function

http://boisgontierjacques.free.fr/fi...hercheTous.xls

JB


On 25 mar, 20:35, BeckyB wrote:
I have various items in a spreadsheet. Some of these items are repeated in
another row, but have a different text description for it. They all have the
same reference number, just a different description. I want to combine all
the descriptions into one cell. I am doing vlookup, but it is only putting in
the first occurance. Can I combine all occurances into one?


.



All times are GMT +1. The time now is 07:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com