combine each subset values in their respective place

michellejames

New Member
Joined
Aug 16, 2013
Messages
27
Hi There,

Greeting! I would like to combine the column R data in column s where the Last word mentioned.

Is this possible?

I would like combine all subset column R values in Column S of Last word mentioned beside cell

https://www.dropbox.com/s/ll1fvpodpuccifv/Find first and last year_v1.xlsx?dl=0

Please check

Example:

[TABLE="class: cms_table, width: 1034"]
<tbody>[TR]
[TD]PG.[/TD]
[TD]Make Name[/TD]
[TD]Model Name[/TD]
[TD]Min Year[/TD]
[TD]Max Year[/TD]
[TD][/TD]
[TD]Unique make[/TD]
[TD]Unique/Duplicate[/TD]
[TD]year make and model[/TD]
[TD]combine in one row[/TD]
[TD]Find Last sku each group[/TD]
[/TR]
[TR]
[TD]100747900A00PG[/TD]
[TD]Tesla[/TD]
[TD]S[/TD]
[TD="align: right"]2012[/TD]
[TD="align: right"]2016[/TD]
[TD]2012-16[/TD]
[TD]Tesla[/TD]
[TD]unique[/TD]
[TD]2012-16 Tesla S[/TD]
[TD]2012-16 Tesla S[/TD]
[TD]Last[/TD]
[/TR]
[TR]
[TD]26300-35503[/TD]
[TD]Hyundai[/TD]
[TD]Accent[/TD]
[TD="align: right"]2008[/TD]
[TD="align: right"]2018[/TD]
[TD]2008-18[/TD]
[TD]Hyundai[/TD]
[TD]unique[/TD]
[TD="colspan: 2"]2008-18 Hyundai Accent[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26300-35503[/TD]
[TD]Hyundai[/TD]
[TD]Elantra[/TD]
[TD="align: right"]2008[/TD]
[TD="align: right"]2019[/TD]
[TD]2008-19[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2008-19 Elantra[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26300-35503[/TD]
[TD]Hyundai[/TD]
[TD]Elantra Coupe[/TD]
[TD="align: right"]2013[/TD]
[TD="align: right"]2014[/TD]
[TD]2013-14[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2013-14 Elantra Coupe[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26300-35503[/TD]
[TD]Hyundai[/TD]
[TD]Elantra GT[/TD]
[TD="align: right"]2013[/TD]
[TD="align: right"]2018[/TD]
[TD]2013-18[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2013-18 Elantra GT[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26300-35503[/TD]
[TD]Hyundai[/TD]
[TD]Genesis Coupe[/TD]
[TD="align: right"]2010[/TD]
[TD="align: right"]2014[/TD]
[TD]2010-14[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2010-14 Genesis Coupe[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26300-35503[/TD]
[TD]Hyundai[/TD]
[TD]Ioniq[/TD]
[TD="align: right"]2017[/TD]
[TD="align: right"]2018[/TD]
[TD]2017-18[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2017-18 Ioniq[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26300-35503[/TD]
[TD]Hyundai[/TD]
[TD]Santa Fe[/TD]
[TD="align: right"]2008[/TD]
[TD="align: right"]2012[/TD]
[TD]2008-12[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2008-12 Santa Fe[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26300-35503[/TD]
[TD]Hyundai[/TD]
[TD]Santa Fe Sport[/TD]
[TD="align: right"]2013[/TD]
[TD="align: right"]2018[/TD]
[TD]2013-18[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2013-18 Santa Fe Sport[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26300-35503[/TD]
[TD]Hyundai[/TD]
[TD]Sonata[/TD]
[TD="align: right"]2008[/TD]
[TD="align: right"]2018[/TD]
[TD]2008-18[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2008-18 Sonata[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26300-35503[/TD]
[TD]Hyundai[/TD]
[TD]Tiburon[/TD]
[TD="align: right"]2008[/TD]
[TD="align: right"]2008[/TD]
[TD]2008-08[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2008-08 Tiburon[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26300-35503[/TD]
[TD]Hyundai[/TD]
[TD]Tucson[/TD]
[TD="align: right"]2008[/TD]
[TD="align: right"]2018[/TD]
[TD]2008-18[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2008-18 Tucson[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26300-35503[/TD]
[TD]Hyundai[/TD]
[TD]Veloster[/TD]
[TD="align: right"]2012[/TD]
[TD="align: right"]2019[/TD]
[TD]2012-19[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2012-19 Veloster[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26300-35503[/TD]
[TD]Kia[/TD]
[TD]Forte[/TD]
[TD="align: right"]2010[/TD]
[TD="align: right"]2018[/TD]
[TD]2010-18[/TD]
[TD]Kia[/TD]
[TD]unique[/TD]
[TD]2010-18 Kia Forte[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26300-35503[/TD]
[TD]Kia[/TD]
[TD]Forte Koup[/TD]
[TD="align: right"]2010[/TD]
[TD="align: right"]2016[/TD]
[TD]2010-16[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2010-16 Forte Koup[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26300-35503[/TD]
[TD]Kia[/TD]
[TD]Forte5[/TD]
[TD="align: right"]2014[/TD]
[TD="align: right"]2016[/TD]
[TD]2014-16[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2014-16 Forte5[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26300-35503[/TD]
[TD]Kia[/TD]
[TD]Niro[/TD]
[TD="align: right"]2017[/TD]
[TD="align: right"]2018[/TD]
[TD]2017-18[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2017-18 Niro[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26300-35503[/TD]
[TD]Kia[/TD]
[TD]Optima[/TD]
[TD="align: right"]2008[/TD]
[TD="align: right"]2018[/TD]
[TD]2008-18[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2008-18 Optima[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26300-35503[/TD]
[TD]Kia[/TD]
[TD]Rio[/TD]
[TD="align: right"]2008[/TD]
[TD="align: right"]2018[/TD]
[TD]2008-18[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2008-18 Rio[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26300-35503[/TD]
[TD]Kia[/TD]
[TD]Rio5[/TD]
[TD="align: right"]2008[/TD]
[TD="align: right"]2011[/TD]
[TD]2008-11[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2008-11 Rio5[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26300-35503[/TD]
[TD]Kia[/TD]
[TD]Rondo[/TD]
[TD="align: right"]2008[/TD]
[TD="align: right"]2016[/TD]
[TD]2008-16[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2008-16 Rondo[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26300-35503[/TD]
[TD]Kia[/TD]
[TD]Sorento[/TD]
[TD="align: right"]2011[/TD]
[TD="align: right"]2018[/TD]
[TD]2011-18[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2011-18 Sorento[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26300-35503[/TD]
[TD]Kia[/TD]
[TD]Soul[/TD]
[TD="align: right"]2010[/TD]
[TD="align: right"]2018[/TD]
[TD]2010-18[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2010-18 Soul[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26300-35503[/TD]
[TD]Kia[/TD]
[TD]Spectra[/TD]
[TD="align: right"]2008[/TD]
[TD="align: right"]2009[/TD]
[TD]2008-09[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2008-09 Spectra[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26300-35503[/TD]
[TD]Kia[/TD]
[TD]Spectra5[/TD]
[TD="align: right"]2008[/TD]
[TD="align: right"]2009[/TD]
[TD]2008-09[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2008-09 Spectra5[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26300-35503[/TD]
[TD]Kia[/TD]
[TD]Sportage[/TD]
[TD="align: right"]2007[/TD]
[TD="align: right"]2018[/TD]
[TD]2007-18[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2007-18 Sportage[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]26300-35503[/TD]
[TD]Kia[/TD]
[TD]Stinger[/TD]
[TD="align: right"]2018[/TD]
[TD="align: right"]2018[/TD]
[TD]2018-18[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2018-18 Stinger[/TD]
[TD]2008-18 Hyundai Accent, 2008-19 Elantra, 2013-14 Elantra Coupe, 2013-18 Elantra GT, 2010-14 Genesis Coupe, 2017-18 Ioniq, 2008-12 Santa Fe, 2013-18 Santa Fe Sport, 2008-18 Sonata, 2008-08 Tiburon, 2008-18 Tucson, 2012-19 Veloster, 2010-18 Kia Forte, 2010-16 Forte Koup, 2014-16 Forte5, 2017-18 Niro, 2008-18 Optima, 2008-18 Rio, 2008-11 Rio5, 2008-16 Rondo, 2011-18 Sorento, 2010-18 Soul, 2008-09 Spectra, 2008-09 Spectra5, 2007-18 Sportage, 2018-18 Stinger[/TD]
[TD]Last[/TD]
[/TR]
[TR]
[TD]A44690[/TD]
[TD]Cadillac[/TD]
[TD]SRX[/TD]
[TD="align: right"]2004[/TD]
[TD="align: right"]2009[/TD]
[TD]2004-09[/TD]
[TD]Cadillac[/TD]
[TD]unique[/TD]
[TD]2004-09 Cadillac SRX[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A44690[/TD]
[TD]Cadillac[/TD]
[TD]STS[/TD]
[TD="align: right"]2005[/TD]
[TD="align: right"]2011[/TD]
[TD]2005-11[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2005-11 STS[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A44690[/TD]
[TD]Cadillac[/TD]
[TD]SRX[/TD]
[TD="align: right"]2004[/TD]
[TD="align: right"]2009[/TD]
[TD]2004-09[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2004-09 SRX[/TD]
[TD]2004-09 Cadillac SRX, 2005-11 STS, 2004-09 SRX[/TD]
[TD]Last[/TD]
[/TR]
[TR]
[TD]DF99379[/TD]
[TD]Chevrolet[/TD]
[TD]Equinox[/TD]
[TD="align: right"]2018[/TD]
[TD="align: right"]2019[/TD]
[TD]2018-19[/TD]
[TD]Chevrolet[/TD]
[TD]unique[/TD]
[TD="colspan: 2"]2018-19 Chevrolet Equinox[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DF99379[/TD]
[TD]Chevrolet[/TD]
[TD]Express 2500[/TD]
[TD="align: right"]2017[/TD]
[TD="align: right"]2019[/TD]
[TD]2017-19[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2017-19 Express 2500[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DF99379[/TD]
[TD]GMC[/TD]
[TD]Savana 2500[/TD]
[TD="align: right"]2017[/TD]
[TD="align: right"]2019[/TD]
[TD]2017-19[/TD]
[TD]GMC[/TD]
[TD]unique[/TD]
[TD="colspan: 2"]2017-19 GMC Savana 2500[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DF99379[/TD]
[TD]GMC[/TD]
[TD]Terrain[/TD]
[TD="align: right"]2018[/TD]
[TD="align: right"]2019[/TD]
[TD]2018-19[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2018-19 Terrain[/TD]
[TD]2018-19 Chevrolet Equinox, 2017-19 Express 2500, 2017-19 GMC Savana 2500, 2018-19 Terrain[/TD]
[TD]Last[/TD]
[/TR]
[TR]
[TD]DF99380[/TD]
[TD]Chevrolet[/TD]
[TD]Cruze[/TD]
[TD="align: right"]2017[/TD]
[TD="align: right"]2019[/TD]
[TD]2017-19[/TD]
[TD]Chevrolet[/TD]
[TD]unique[/TD]
[TD="colspan: 2"]2017-19 Chevrolet Cruze[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DF99380[/TD]
[TD]Chevrolet[/TD]
[TD]Silverado 2500 HD[/TD]
[TD="align: right"]2017[/TD]
[TD="align: right"]2019[/TD]
[TD]2017-19[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD="colspan: 2"]2017-19 Silverado 2500 HD[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DF99380[/TD]
[TD]GMC[/TD]
[TD]Sierra 2500 HD[/TD]
[TD="align: right"]2017[/TD]
[TD="align: right"]2019[/TD]
[TD]2017-19[/TD]
[TD]GMC[/TD]
[TD]unique[/TD]
[TD="colspan: 2"]2017-19 GMC Sierra 2500 HD[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DF99380[/TD]
[TD]GMC[/TD]
[TD]Sierra 3500 HD[/TD]
[TD="align: right"]2017[/TD]
[TD="align: right"]2019[/TD]
[TD]2017-19[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2017-19 Sierra 3500 HD[/TD]
[TD]2017-19 Chevrolet Cruze, 2017-19 Silverado 2500 HD, 2017-19 GMC Sierra 2500 HD, 2017-19 Sierra 3500 HD[/TD]
[TD]Last[/TD]
[/TR]
[TR]
[TD]PA4278[/TD]
[TD]Infiniti[/TD]
[TD]QX60[/TD]
[TD="align: right"]2014[/TD]
[TD="align: right"]2019[/TD]
[TD]2014-19[/TD]
[TD]Infiniti[/TD]
[TD]unique[/TD]
[TD]2014-19 Infiniti QX60[/TD]
[TD]2014-19 Infiniti QX60[/TD]
[TD]Last[/TD]
[/TR]
[TR]
[TD]PA4675[/TD]
[TD]Infiniti[/TD]
[TD]Q70[/TD]
[TD="align: right"]2014[/TD]
[TD="align: right"]2019[/TD]
[TD]2014-19[/TD]
[TD]Infiniti[/TD]
[TD]unique[/TD]
[TD]2014-19 Infiniti Q70[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]PA4675[/TD]
[TD]Infiniti[/TD]
[TD]Q70L[/TD]
[TD="align: right"]2015[/TD]
[TD="align: right"]2019[/TD]
[TD]2015-19[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2015-19 Q70L[/TD]
[TD]2014-19 Infiniti Q70, 2015-19 Q70L[/TD]
[TD]Last[/TD]
[/TR]
[TR]
[TD]PA5558[/TD]
[TD]KMW[/TD]
[TD]M760i xDrive[/TD]
[TD="align: right"]2019[/TD]
[TD="align: right"]2019[/TD]
[TD]2019-19[/TD]
[TD]KMW[/TD]
[TD]unique[/TD]
[TD]2019-19 KMW M760i xDrive[/TD]
[TD]2019-19 KMW M760i xDrive[/TD]
[TD]Last[/TD]
[/TR]
[TR]
[TD]PA5655[/TD]
[TD]Toyota[/TD]
[TD]Corolla[/TD]
[TD="align: right"]2009[/TD]
[TD="align: right"]2019[/TD]
[TD]2009-19[/TD]
[TD]Toyota[/TD]
[TD]unique[/TD]
[TD]2009-19 Toyota Corolla[/TD]
[TD]2009-19 Toyota Corolla[/TD]
[TD]Last[/TD]
[/TR]
[TR]
[TD]PA5824[/TD]
[TD]Nissan[/TD]
[TD]370Z[/TD]
[TD="align: right"]2009[/TD]
[TD="align: right"]2019[/TD]
[TD]2009-19[/TD]
[TD]Nissan[/TD]
[TD]unique[/TD]
[TD]2009-19 Nissan 370Z[/TD]
[TD]2009-19 Nissan 370Z[/TD]
[TD]Last[/TD]
[/TR]
[TR]
[TD]PA5900[/TD]
[TD]KMW[/TD]
[TD]640i Gran Coupe[/TD]
[TD="align: right"]2013[/TD]
[TD="align: right"]2019[/TD]
[TD]2013-19[/TD]
[TD]KMW[/TD]
[TD]unique[/TD]
[TD="colspan: 2"]2013-19 KMW 640i Gran Coupe[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]PA5900[/TD]
[TD]KMW[/TD]
[TD]640i xDrive Gran Coupe[/TD]
[TD="align: right"]2014[/TD]
[TD="align: right"]2019[/TD]
[TD]2014-19[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2014-19 640i xDrive Gran Coupe[/TD]
[TD]2013-19 KMW 640i Gran Coupe, 2014-19 640i xDrive Gran Coupe[/TD]
[TD]Last[/TD]
[/TR]
[TR]
[TD]PA6116[/TD]
[TD]Dodge[/TD]
[TD]Durango[/TD]
[TD="align: right"]2011[/TD]
[TD="align: right"]2019[/TD]
[TD]2011-19[/TD]
[TD]Dodge[/TD]
[TD]unique[/TD]
[TD="colspan: 2"]2011-19 Dodge Durango[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]PA6116[/TD]
[TD]Toyota[/TD]
[TD]Highlander[/TD]
[TD="align: right"]2014[/TD]
[TD="align: right"]2019[/TD]
[TD]2014-19[/TD]
[TD]Toyota[/TD]
[TD]unique[/TD]
[TD="colspan: 2"]2014-19 Toyota Highlander[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]PA6116[/TD]
[TD]Toyota[/TD]
[TD]Sienna[/TD]
[TD="align: right"]2011[/TD]
[TD="align: right"]2019[/TD]
[TD]2011-19[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2011-19 Sienna[/TD]
[TD]2011-19 Dodge Durango, 2014-19 Toyota Highlander, 2011-19 Sienna[/TD]
[TD]Last[/TD]
[/TR]
[TR]
[TD]PA99265[/TD]
[TD]Toyota[/TD]
[TD]Camry[/TD]
[TD="align: right"]2018[/TD]
[TD="align: right"]2019[/TD]
[TD]2018-19[/TD]
[TD]Toyota[/TD]
[TD]unique[/TD]
[TD]2018-19 Toyota Camry[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]PA99265[/TD]
[TD]Toyota[/TD]
[TD]C-HR[/TD]
[TD="align: right"]2018[/TD]
[TD="align: right"]2019[/TD]
[TD]2018-19[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2018-19 C-HR[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]PA99265[/TD]
[TD]Toyota[/TD]
[TD]Corolla[/TD]
[TD="align: right"]2019[/TD]
[TD="align: right"]2019[/TD]
[TD]2019-19[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2019-19 Corolla[/TD]
[TD]2018-19 Toyota Camry, 2018-19 C-HR, 2019-19 Corolla[/TD]
[TD]Last[/TD]
[/TR]
[TR]
[TD]PA99267[/TD]
[TD]Toyota[/TD]
[TD]Avalon[/TD]
[TD="align: right"]2019[/TD]
[TD="align: right"]2019[/TD]
[TD]2019-19[/TD]
[TD]Toyota[/TD]
[TD]unique[/TD]
[TD]2019-19 Toyota Avalon[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]PA99267[/TD]
[TD]Toyota[/TD]
[TD]Camry[/TD]
[TD="align: right"]2018[/TD]
[TD="align: right"]2019[/TD]
[TD]2018-19[/TD]
[TD][/TD]
[TD]Duplicate[/TD]
[TD]2018-19 Camry[/TD]
[TD]2019-19 Toyota Avalon, 2018-19 Camry[/TD]
[TD]Last[/TD]
[/TR]
</tbody>[/TABLE]


Regards,
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
How about
Code:
Sub michellejames()
   Dim Cl As Range
   
   With CreateObject("scripting.dictionary")
      For Each Cl In Range("J2", Range("J" & Rows.Count).End(xlUp).Offset(1))
         If Not .Exists(Cl.Value) Then
            .Item(Cl.Value) = Cl.Offset(, 8).Value
            Cl.Offset(-1, 9) = .Item(Cl.Offset(-1).Value)
         Else
            .Item(Cl.Value) = .Item(Cl.Value) & ", " & Cl.Offset(, 8).Value
         End If
      Next Cl
   End With
End Sub
 
Upvote 0
Hi,

If you have the TEXTJOIN function, it will probably do what you want, but I Don't have that function and I'm not sure.

Do you mind using a Helper Column that you can hide out of sight?
 
Upvote 0
Hi There,

Greeting! Again thanks. It working fine.

Regards,

How about
Code:
Sub michellejames()
   Dim Cl As Range
   
   With CreateObject("scripting.dictionary")
      For Each Cl In Range("J2", Range("J" & Rows.Count).End(xlUp).Offset(1))
         If Not .Exists(Cl.Value) Then
            .Item(Cl.Value) = Cl.Offset(, 8).Value
            Cl.Offset(-1, 9) = .Item(Cl.Offset(-1).Value)
         Else
            .Item(Cl.Value) = .Item(Cl.Value) & ", " & Cl.Offset(, 8).Value
         End If
      Next Cl
   End With
End Sub
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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