+ Reply to Thread
Results 1 to 6 of 6

Require column data in a row based on one fixed value

  1. #1
    Registered User
    Join Date
    01-04-2016
    Location
    Chennai
    MS-Off Ver
    2016
    Posts
    43

    Require column data in a row based on one fixed value

    Hi there,

    I have a set of data in the below format in excel.

    Names Items
    John Pen
    John Pencil
    James Pen
    James Scale
    James Eraser
    Jeremy Pen
    Jeremy File

    Which I wanted to change it into the below format.

    Names Item1 Item2 Item3
    John Pen Pencil
    James Pen Scale Eraser
    Jeremy Pen File

    How can I do this quickly and in a easy way? Kindly help.

  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
    44,004

    Re: Require column data in a row based on one fixed value

    Yes. In E3, copied down:
    =IFERROR(INDEX($A$3:$A$13,MATCH(0,INDEX(COUNTIF($E$2:$E2,$A$3:$A$13),0),0)),"")

    In F3, copied across and dnown:
    =IFERROR(INDEX($B:$B,SMALL(IF($A$3:$A$13=$E3,ROW($A$3:$A$13)),COLUMNS($A:A))),"")

    If you have Excel 2010 or later, there are non-array formula alternatives. However, the formula in F3 is an array formula. 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

  3. #3
    Registered User
    Join Date
    01-04-2016
    Location
    Chennai
    MS-Off Ver
    2016
    Posts
    43

    Re: Require column data in a row based on one fixed value

    Wow thanks Kennedy. This really helps my work with the large amount of data I am handling.

  4. #4
    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,004

    Re: Require column data in a row based on one fixed value

    You're welcome and thanks for the rep.

  5. #5
    Registered User
    Join Date
    01-04-2016
    Location
    Chennai
    MS-Off Ver
    2016
    Posts
    43

    Re: Require column data in a row based on one fixed value

    Can you please do that in the attached files and give me? I am trying and couldn't succeed.
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Require column data in a row based on one fixed value

    Here is the application of Glenn's formulas to the first few ID's of the P1 file.
    Note that you'll need to copy the second formula over until all data from column B is arranged and then modify the second formula to copy the data from column C.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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: 1
    Last Post: 10-26-2016, 08:54 PM
  2. Replies: 5
    Last Post: 08-15-2016, 03:33 PM
  3. Require Macro to get data in separate column
    By sriku in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-16-2014, 02:52 PM
  4. Replies: 3
    Last Post: 11-15-2013, 09:38 AM
  5. Loan Calculator with Terms based on Fixed Payment not a fixed time frame.
    By cc4digital in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-03-2012, 04:49 AM
  6. Replies: 2
    Last Post: 11-22-2011, 12:33 PM
  7. Color column range based on content in fixed cell
    By xxxyyyy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-09-2009, 01:52 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