Hi - looking for a formula/code to lookup a range of values from a matched value and present them in a single cell concatenated format including range and comma separator:
There will sometimes be sequential values that can be ranged i.e. 100-106 but then there may be single values so needs to display i.e. 100-106, 110
DATA
[TABLE="width: 203"]
<tbody>[TR]
[TD]R/C[/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Name[/TD]
[TD]Code[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Robby[/TD]
[TD]2234[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Robby[/TD]
[TD]2235[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Robby[/TD]
[TD]2236[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Robby[/TD]
[TD]3455[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Dave[/TD]
[TD]9867[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]Dave[/TD]
[TD]9868[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]Dave[/TD]
[TD]3232[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]Dave[/TD]
[TD]1112[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody><colgroup><col span="2"><col></colgroup>[/TABLE]
OUTPUT TO:
[TABLE="width: 334"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Code Range[/TD]
[/TR]
[TR]
[TD]Robby[/TD]
[TD]2234-2236,3455[/TD]
[/TR]
[TR]
[TD]Dave[/TD]
[TD]9867-9868,3232,1112[/TD]
[/TR]
</tbody><colgroup><col span="2"></colgroup>[/TABLE]
There will sometimes be sequential values that can be ranged i.e. 100-106 but then there may be single values so needs to display i.e. 100-106, 110
DATA
[TABLE="width: 203"]
<tbody>[TR]
[TD]R/C[/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Name[/TD]
[TD]Code[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Robby[/TD]
[TD]2234[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Robby[/TD]
[TD]2235[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Robby[/TD]
[TD]2236[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Robby[/TD]
[TD]3455[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Dave[/TD]
[TD]9867[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]Dave[/TD]
[TD]9868[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]Dave[/TD]
[TD]3232[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]Dave[/TD]
[TD]1112[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody><colgroup><col span="2"><col></colgroup>[/TABLE]
OUTPUT TO:
[TABLE="width: 334"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Code Range[/TD]
[/TR]
[TR]
[TD]Robby[/TD]
[TD]2234-2236,3455[/TD]
[/TR]
[TR]
[TD]Dave[/TD]
[TD]9867-9868,3232,1112[/TD]
[/TR]
</tbody><colgroup><col span="2"></colgroup>[/TABLE]