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>
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Forum statistics

Threads
1,214,983
Messages
6,122,588
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top