merge cell values if common value in adjacent cell

shumonsaha

Board Regular
Joined
Mar 22, 2009
Messages
56
I have data in two columns

Column A has values with names like -

John, Paul, Hena, Kumar, Paul, Hena, John in different rows

Colum B has day values - eg , sun, mon, tue, wed , thu, fri and sat

I want to insert a new column C with formula that returns

1. for every John, concatenate of all the day values adjacent to row of John eg "sunmonfri"

Similarly for all the values in Column A, Column C should reflect the concatenate values of Column B.

Please help
 
Thanks Aladdin. That was too good.

Maybe asking for too much.. but any way I can get it to revert with days in serial order eg. sun mon tue wed thu fri sat

Currently its all jumbled up..

C2:

Control+shift+enter, not just enter...
Code:
=MCONCAT(LOOKUP(UNIQUEVALUES(
    IF($A$2:$A$8=A2,LOOKUP($B$2:$B$8,
      {"Fri",6;"Mon",2;"Sat",7;"Sun",1;"Thu",5;"Tue",3;"Wed",4}),""),1),
    {"","";1,"Sun";2,"Mon";3,"Tue";4,"Wed";5,"Thu";6,"Fri";7,"Sat"}))
 
Upvote 0

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,214,979
Messages
6,122,552
Members
449,088
Latest member
davidcom

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