+ Reply to Thread
Results 1 to 10 of 10

Combining cells based on value of adjacent cell.

  1. #1
    Registered User
    Join Date
    01-11-2009
    Location
    sunny scotland
    MS-Off Ver
    Excel 2007
    Posts
    2

    Combining cells based on value of adjacent cell.

    Hey there.... I'm new to the forums so please be gentle with me

    I have been reading through trying to find a similar post but the nearest i could find was one dealing with numbers rather than text.....

    This is how the workbook looks...

    Column A contains a list of numbers based on vehicle types

    Column B contains a list of vehicle names

    A B
    1 Car,
    1 Taxi,
    2 Bus,
    2 Lorry,
    3 Skateboard,
    3 Bike,
    1 Motorcycle,


    What I am looking for is the best way to combine the text from column B depending on the value of column a.

    the finished results would then end up as: "Car,Taxi,Motorcycle,", or "Bus,Lorry," etc.......

    This is just a simple list.. The one I am working with has around 2500 entries. I have been trying to do this using the CONCATENATE function and IF statement but it's just not working..... My head is ready to explode

    Can someone point me in the right direction?

    TIA

    Gav.
    Last edited by Gav-UK; 01-12-2009 at 03:59 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    If you want all the matches to appear in one cell, then Excel has no easy way to do it.., but there is a free addin found here: http://xcell05.free.fr/morefunc/english/ called Morefunc.xll.

    If you download it you can use the MCONCAT() function.

    =MCONCAT(IF($A$1:$A$7=A1,$B$1:$B$7,""))

    Which, after you adjust the ranges to suit your actual data, must be confirmed with CTRL+SHIFT+ENTER not just ENTER. You will see { } brackets appear around the formula.

    Then copy down.

    This will repeat the result when the same number occurs in column A.

    If you don't want repeats and you simply want result for 1, 2, 3, etc

    then try:

    e.g. =MCONCAT(IF($A$1:$A$7=ROWS($A$1:$A1),$B$1:$B$7,""))

    again, confirmed with CSE keys and copied down.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    01-11-2009
    Location
    sunny scotland
    MS-Off Ver
    Excel 2007
    Posts
    2
    Your sir, are a super star.

    That worked a treat.. exactly what i was trying to do

    Moocho Grassy-***

    Gav.

  4. #4
    Registered User
    Join Date
    09-20-2012
    Location
    Manila
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Combining cells based on value of adjacent cell.

    Hi,

    I have a problem with my formula the solution here seems to be the same however, I could not see the : http://xcell05.free.fr/morefunc/english/ called Morefunc.xll. anymore. help pls,
    thank you!

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Combining cells based on value of adjacent cell.

    kcgatchi,

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  6. #6
    Registered User
    Join Date
    09-20-2012
    Location
    Manila
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Combining cells based on value of adjacent cell.

    Thank you so much and I appreciate the feedback

  7. #7
    Registered User
    Join Date
    09-20-2012
    Location
    Manila
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Combining cells based on value of adjacent cell.

    Hi again,

    I have trying to look for an icon where I can post my question but I cant seem to know how, can you please help me? I can only see the inbox and it's asking for recipients.

    THanks!

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Combining cells based on value of adjacent cell.

    Go to the relevant subforum on the main page like Excel Programming or Excel General or Excel functions. Click on it, you will see a button "Post New Thread". Click on that and proceed.

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Combining cells based on value of adjacent cell.

    If you are only looking for a place to download the Morefunc addin, try here:

    http://download.cnet.com/Morefunc/30...-10423159.html

    If you have actual questions, then start new thread.

  10. #10
    Registered User
    Join Date
    09-20-2012
    Location
    Manila
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Combining cells based on value of adjacent cell.

    Thank you so much

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1