+ Reply to Thread
Results 1 to 7 of 7

Formula for Combining Values from Rows

  1. #1
    Registered User
    Join Date
    12-02-2019
    Location
    scotch plains
    MS-Off Ver
    2010
    Posts
    5

    Formula for Combining Values from Rows

    I have a column of repeating ID numbers and a column of corresponding school subjects. How do I structure a formula so that there is a single row with a unique ID number and a cell that combines all of the values of the school subjects? See attached for example.
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Formula for Combining Values from Rows

    Hello Abhishek ,

    go to the Post 4 of the thread https://www.excelforum.com/tips-and-...geravatar.html

    copy the code go to developer tab then click visual basic and click insert and insert , insert a module and then paste the code
    now you can use this user defined function (UDF) in your sheet.

    then In H2 copy paste below
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    You can also go for VBA code otherwise.
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Formula for Combining Values from Rows

    ARRAY formulas are used

    In E2 then copy down

    =IFERROR(INDEX($A$2:$A$11,SMALL(IF(COUNTIF($E$1:E1,$A$2:$A$11)=0,ROW($A$2:$A$11),""),1)-ROW($A$2)+1),"")

    In F2 then copy across

    =IFERROR(INDEX($B$2:$B$11,SMALL(IF($A$2:$A$11=$E2,ROW($B$2:$B$11),""),COLUMNS($E2:E2))-ROW($A$2)+1),"")

    ARRAY formula is used

    To enter ARRAY formula
    Paste the formula
    Press F2
    Press Ctrl+Shift+Enter keys together.
    formula will be covered with{} brackets by excel.
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  4. #4
    Registered User
    Join Date
    12-02-2019
    Location
    scotch plains
    MS-Off Ver
    2010
    Posts
    5

    Re: Formula for Combining Values from Rows

    Thanks - I'm getting #NAME in the cell - what am I doing wrong?

  5. #5
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Formula for Combining Values from Rows

    To whom you are responding !

  6. #6
    Registered User
    Join Date
    12-02-2019
    Location
    scotch plains
    MS-Off Ver
    2010
    Posts
    5

    Re: Formula for Combining Values from Rows

    Responding to hemesh

  7. #7
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Formula for Combining Values from Rows

    Check the attachment!
    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. Replies: 5
    Last Post: 07-31-2018, 01:43 PM
  2. Need Help Combining rows and totaling cell values within them
    By Happy Hooker in forum Excel General
    Replies: 1
    Last Post: 01-04-2017, 04:25 PM
  3. Combining some of the rows Values based on multiple criteria (2)
    By Svenbe in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-18-2014, 08:59 AM
  4. Combining Rows Based On Matching Values in one column
    By jeffocasm in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-15-2013, 07:16 PM
  5. Combining rows where some cells have null values
    By speechcommgal in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-23-2013, 02:27 PM
  6. Replies: 2
    Last Post: 06-22-2011, 06:50 PM
  7. Combining Values in rows and keeping unique values (adv. filtering?)
    By nguyeda in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-26-2011, 01:48 PM

Tags for this Thread

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