+ Reply to Thread
Results 1 to 10 of 10

Need multiple cell value in single cell based on unique Material ID

  1. #1
    Registered User
    Join Date
    01-14-2016
    Location
    Karachi
    MS-Off Ver
    MS Office Excel 2013 & 2010
    Posts
    21

    Need multiple cell value in single cell based on unique Material ID

    Hello Everyone,


    Need assistance in performing a task

    I have to merge values in different cells based on unique product id. File attached for Reference.

    BR!
    Attached Files Attached Files

  2. #2
    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
    43,984

    Re: Need multiple cell value in single cell based on unique Material ID

    What is the MAXIMUM number of POs in a single cell? Is a VBA solution OK with you?
    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

  3. #3
    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
    43,984

    Re: Need multiple cell value in single cell based on unique Material ID

    Take a look (enable macros). Happy to explain if it meets your needs.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    01-14-2016
    Location
    Karachi
    MS-Off Ver
    MS Office Excel 2013 & 2010
    Posts
    21

    Re: Need multiple cell value in single cell based on unique Material ID

    Thanks Glenn for your response, can I have a formula that does not require Macros to be enabled, as the formula worked on the sheet you attached only. when I tried it in a separate file it didn't worked.

  5. #5
    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
    43,984

    Re: Need multiple cell value in single cell based on unique Material ID

    It wont work on another sheet unless you set it up correctly. That is why I asked you if it was OK and then I would explain it.
    You did not answer my Q about the maximum number of POs...

  6. #6
    Registered User
    Join Date
    01-14-2016
    Location
    Karachi
    MS-Off Ver
    MS Office Excel 2013 & 2010
    Posts
    21

    Re: Need multiple cell value in single cell based on unique Material ID

    maximum number of POs would be 15.

  7. #7
    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
    43,984

    Re: Need multiple cell value in single cell based on unique Material ID

    Formula is impossible. Is VBA OK? If so, I will explain in an hour or so. Am out for a while.

  8. #8
    Registered User
    Join Date
    01-14-2016
    Location
    Karachi
    MS-Off Ver
    MS Office Excel 2013 & 2010
    Posts
    21

    Re: Need multiple cell value in single cell based on unique Material ID

    I have never used VBA, but willing to learn.

  9. #9
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Need multiple cell value in single cell based on unique Material ID

    Please try with helper column

    Data, E2 copy down

    =IFERROR(D2&CHAR(10)&INDEX(E3:E33,MATCH(B2,B3:B33,)),D2)

    Required Data Format B2 copy down

    =INDEX(Data!$E$2:$E$33,MATCH(A2,Data!$B$2:$B$33,))



    Or for Excel365 with Textjoin, no need helper column E in sheet Data
    Required Data Format D2 press Ctrl+Shift+Enter copy down

    =Textjoin(CHAR(10),,IF(Data!$B$2:$B$33=A2,Data!$D$2:$D$33,""))
    Attached Files Attached Files

  10. #10
    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
    43,984

    Re: Need multiple cell value in single cell based on unique Material ID

    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(Data!$B$2:$B$33='Required Data Format'!A2,Data!$A$2:$A$33&" "&Data!$C$2:$C$33,""),CHAR(10))

    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

+ 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. [SOLVED] Extract Unique Value with Multiple Entries in a single cell
    By spishowtime in forum Excel General
    Replies: 4
    Last Post: 03-08-2017, 04:40 PM
  2. Autofill several cells based on single unique cell
    By Sherhrtg in forum Excel General
    Replies: 5
    Last Post: 05-27-2016, 09:18 AM
  3. [SOLVED] Listing unique values, based on matching two other columns in a single cell
    By bsamson05 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-17-2016, 03:36 PM
  4. [SOLVED] How to return multiple values to a single cell based on multiple criteria
    By lwallace in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-20-2014, 06:32 AM
  5. Need help moving multiple lines of data in single cell to unique subsequent rows
    By brettmburns in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-21-2012, 03:04 PM
  6. Display data from multiple cell in a single cell, based on criteria
    By Mothman in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-08-2012, 07:24 AM
  7. Filter Multiple PTs Based on a Single Cell Value
    By iconz23 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-20-2012, 01:21 PM

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