+ Reply to Thread
Results 1 to 2 of 2

How to transpose the values in the cells that belong to the same value in the other column

Hybrid View

  1. #1
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    How to transpose the values in the cells that belong to the same value in the other column

    Hi,
    I have a query but I don't know that how to exactly explain it so writing it with the example....
    Suppose I have values in the worksheet as below...
    A B
    1 John
    5 John
    3 John
    7 John
    2 Mike
    3 Mike
    9 Mike
    and so on....There are thousands of records. The values in column A belong to a value in column B and I want them in the following way...

    A B C D E F G H
    John 1 5 3 7
    Mike 2 3 9

    I can do it manually by copying the values in the column A and transpose them next to the john and Mike but what if the data is too large ?
    Is there any easy way to handle this task?
    I have attached a file also.

    Thanks in advance.

    sktneer
    Attached Files Attached Files

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: How to transpose the values in the cells that belong to the same value in the other co

    Hi,

    In your sheet in cell C23, enter this array formula (confirm with CTRL+SHIFT+ENTER, not just ENTER) and copy down as required (i.e. for Mike and Clark):

    =IFERROR(INDEX($A$3:$A$21,SMALL(IF($B$3:$B$21=$B23,ROW($B$3:$B$21)),COLUMNS($C$1:C$1))-2,1),"")

    You will need to copy this to the right for at least as many cells as equals the number of entries in your table for each person's name.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

+ 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