+ Reply to Thread
Results 1 to 17 of 17

Source multiple ID's into one cell separated by a comma.

  1. #1
    Registered User
    Join Date
    02-16-2018
    Location
    Amsterdam
    MS-Off Ver
    2016
    Posts
    11

    Source multiple ID's into one cell separated by a comma.

    Hi All,

    Can someone please explain me how I need to source multiple id's from one column into one cell, the identifier would be the author name.
    Please see example attached.

    Thanks in advanced.

    Kind regards,
    Nordin
    Attached Files Attached Files

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Source multiple ID's into one cell separated by a comma.

    I think you need to post an example of what you want to see as a result.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Source multiple ID's into one cell separated by a comma.

    Something like this one?
    Done with PowerQuery (Get&Transform)

  4. #4
    Registered User
    Join Date
    02-16-2018
    Location
    Amsterdam
    MS-Off Ver
    2016
    Posts
    11

    Re: Source multiple ID's into one cell separated by a comma.

    Hi JLGWhiz,

    What I want to achieve is something like this
    Paper Authors ID
    Market Research Michael, Criss, David 1,2,3

  5. #5
    Registered User
    Join Date
    02-16-2018
    Location
    Amsterdam
    MS-Off Ver
    2016
    Posts
    11

    Re: Source multiple ID's into one cell separated by a comma.

    Hi Sandy666,

    That's exactly the outcome I am looking for but I can't see how you did this?

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Source multiple ID's into one cell separated by a comma.

    Data - Show Queries then double click on Table1 on the right side and again on the right side you'll see steps

  7. #7
    Registered User
    Join Date
    02-16-2018
    Location
    Amsterdam
    MS-Off Ver
    2016
    Posts
    11

    Re: Source multiple ID's into one cell separated by a comma.

    I don't have that option under data??

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Source multiple ID's into one cell separated by a comma.

    here is:

    showqueries.jpg

    or you've Excel for students or something

    or try Alt A PS
    Last edited by sandy666; 02-16-2018 at 05:56 PM.

  9. #9
    Registered User
    Join Date
    02-16-2018
    Location
    Amsterdam
    MS-Off Ver
    2016
    Posts
    11

    Re: Source multiple ID's into one cell separated by a comma.

    is it different in Excel for MAC??

  10. #10
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Source multiple ID's into one cell separated by a comma.

    you should update your profile to MAC 2016
    less troubles and posts because Excel for Mac doesn't support (yet) PowerQuery

  11. #11
    Registered User
    Join Date
    02-16-2018
    Location
    Amsterdam
    MS-Off Ver
    2016
    Posts
    11

    Re: Source multiple ID's into one cell separated by a comma.

    Thank you sorry did not know that there was a difference I will update my profile.

  12. #12
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Source multiple ID's into one cell separated by a comma.

    Looks much better

    Have a nice day

  13. #13
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,045

    Re: Source multiple ID's into one cell separated by a comma.

    One way:
    Please Login or Register  to view this content.
    How to install your new code
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Press Alt+F11 to open the Visual Basic Editor
    Choose Insert > Module
    Edit > Paste the macro into the module that appeared
    Close the VBEditor
    Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    Then use this array formula:
    =concatall(IF(ISNUMBER(SEARCH(Authors!$B$2:$B$4,B2)),Authors!$A$2:$A$4,""),", ")

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  14. #14
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Source multiple ID's into one cell separated by a comma.

    Response posted in the duplicate thread (I was unable to merge):

    Quote Originally Posted by xladept View Post
    Hi Nordin,

    Here's a macro:

    Please Login or Register  to view this content.
    If you haven't used macros before you'll need to go to:
    File- options - trust center -trust center settings - macro settings ,
    the second option down (disable all macros with notification)

    Then - Copy the code to the clipboard

    Open your Workbook

    Press ALT + F11 to open the Visual Basic Editor.

    Select "Module" from the Insert menu

    Type "Option Explicit" then paste the code under it

    With the cursor between Sub and End Sub press F5 (F8 to Single Step)

    OR

    Press ALT + Q to close the code window.

    Press ALT + F8 then double click on the macro name
    *Be sure to save the book with the code as Macro-Enabled
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  15. #15
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Source multiple ID's into one cell separated by a comma.

    Here's your book with the code:
    Attached Files Attached Files
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  16. #16
    Registered User
    Join Date
    02-16-2018
    Location
    Amsterdam
    MS-Off Ver
    2016
    Posts
    11

    Re: Source multiple ID's into one cell separated by a comma.

    Thank you xladept. I have closed the thread thanks to you I have the solution I am looking for.

  17. #17
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Source multiple ID's into one cell separated by a comma.

    You're welcome and thanks for the rep!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 16
    Last Post: 02-21-2017, 02:10 AM
  2. [SOLVED] Vlookup table array matching with multiple value in single cell separated by comma.
    By kannoy in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 03-04-2015, 04:03 AM
  3. INDEX & MATCH multiple rows to return comma separated cell
    By sifuchi in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-18-2015, 04:36 PM
  4. [SOLVED] Splitting Cell that contains multiple Headers with Data separated by comma.
    By omershafiq2012 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-25-2014, 09:42 AM
  5. Replies: 4
    Last Post: 03-13-2013, 07:52 AM
  6. Help with counting multiple items in a cell separated by a comma
    By excelnoobies in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-11-2012, 02:43 AM
  7. Replies: 4
    Last Post: 09-04-2010, 03:37 AM

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