Lookup a list of values and return values in singe cell concatenated format

rstuart76

New Member
Joined
May 21, 2017
Messages
1
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


R/CAB
2NameCode
3Robby2234
4Robby2235
5Robby2236
6Robby3455
7Dave9867
8Dave9868
9Dave3232
10Dave1112

<tbody>
</tbody><colgroup><col span="2"><col></colgroup>
OUTPUT TO:

NameCode Range
Robby2234-2236,3455
Dave9867-9868,3232,1112

<tbody>
</tbody><colgroup><col span="2"></colgroup>
 

Some videos you may like

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Watch MrExcel Video

Forum statistics

Threads
1,095,480
Messages
5,444,733
Members
405,298
Latest member
fxtrtr17

This Week's Hot Topics

Top