conditional text merge

  • Thread starter Thread starter norika
  • Start date Start date
N

norika

I want to merge text under the following criteria,

First issue (data in Col A in sequence)
Col A(text) Col B(text)
a gg
a hh
a s
b r
b ee
c tt
d ss
d ee

Merge to:
a gg hh s
b r
c tt
d ss ee

Second issue (data in Col A not in sequence)

a gg
b r
a hh
a s
b ee
d ss
c tt
d ee

Merge to:
a gg hh s
b r
c tt
d ss ee

Is it possible to merge it?

TIA

norik
 
Hi
yes it is possible but will require some VBA. below one
way:
1. Create a unique list for column A on a separate sheet:
- select column A
- goto 'Data - Filter - Advanced Filter' and check 'Unique
records'. Copy this list to a separate sheet.
- assumption: you have this unique list of columnA values
in sheet 2 in column A

2. Download some add-ins to help you combine the data:
- download Alan Beban's array functions:
http://home.pacbell.net/beban
- download the free add-in Morefunc.xll
http://longre.free.fr/english/


3. Now enter the following formula in sheet2, in cell B1:
=MCONCAT(VLOOKUPS(A1,'sheet1'!$A$1:$B$100,2),", ")
and copy this down
 
Back
Top