+ Reply to Thread
Results 1 to 9 of 9

Need a formula to transpose data from a Column to a Row

  1. #1
    Registered User
    Join Date
    10-12-2012
    Location
    Southampton, England
    MS-Off Ver
    365
    Posts
    26

    Need a formula to transpose data from a Column to a Row

    Hi,

    I can do this the easy way by using Paste Special and using Transpose, only my list is so long I'm hoping there is a formula that can do it for me.
    I've already filtered out the data, the list is actually much longer but I've cut it down for the purpose of this post.

    You can see in Column D that I have filtered out unique Part No's from Column A. I've provided an example on Row 2 of what I hope to achieve, which is to transpose the data from Column B against the relevant Part No in Column D.

    I just don't know how to automate this process. Any help very much appreciated on this.

    Regards,
    Adam.
    Attached Files Attached Files

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Need a formula to transpose data from a Column to a Row

    See attached wb. Its a macro just click button.

    Code-Groups.xls


    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Registered User
    Join Date
    10-12-2012
    Location
    Southampton, England
    MS-Off Ver
    365
    Posts
    26

    Re: Need a formula to transpose data from a Column to a Row

    Many thanks,

    I tried as you said but it only seems to convert one row and then comes up with the following error -

    Run-time error '1004':
    Application-defined or object-defined error

    I've attached a screenshot of when I click De-bug.

    Otherwise it worked fine on that first line.
    Attached Images Attached Images

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Need a formula to transpose data from a Column to a Row

    Hmm??? Did you add more data to the sheet?

  5. #5
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Need a formula to transpose data from a Column to a Row

    Did you copy the code to another wb or did you run the file I uploaded?

  6. #6
    Registered User
    Join Date
    10-12-2012
    Location
    Southampton, England
    MS-Off Ver
    365
    Posts
    26

    Re: Need a formula to transpose data from a Column to a Row

    I just ran it as you uploaded, saved a copy to my PC and tried running it but got the same result.

    No data added, just as is.

    Thanks.

  7. #7
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Need a formula to transpose data from a Column to a Row

    In E2: =INDEX($B:$B,COLUMNS($A:B))

    copy across

  8. #8
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Need a formula to transpose data from a Column to a Row

    Try replacing the code with this one

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    10-12-2012
    Location
    Southampton, England
    MS-Off Ver
    365
    Posts
    26

    Re: Need a formula to transpose data from a Column to a Row

    Quote Originally Posted by Teethless mama View Post
    In E2: =INDEX($B:$B,COLUMNS($A:B))

    copy across
    Thanks.

    That works going across but how about going down for the other part numbers? I seem to get the same results as the first line.

    Mike, that amendment works perfectly! Many many thanks.

  10. #10
    Registered User
    Join Date
    12-29-2011
    Location
    merseyside
    MS-Off Ver
    Excel 20010
    Posts
    5

    Re: Need a formula to transpose data from a Column to a Row

    I have this half working/understood but could anyone just check my spreadsheet please and explain a little more. I have uploaded a small test version and I am looking to add all colour options of the same product code (col D) to be transposed in to col G corresponding cells, I will then filter and remove duplicate data so I am just left with 1 product code for all colours but will have all colours in a 1 cell in column g (or if after concatenating anyways). you will see there are only 4 product codes and each has a different number of colours in rows.
    you will see in the jpeg the data that I want to appear in just 1 cell, or transposed across a number of cells
    Thanks for any help, john

    john
    Attached Images Attached Images
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    11-12-2012
    Location
    dubai
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Need a formula to transpose data from a Column to a Row

    hey if you need to transpose data use below formular.(its dynamic)
    =TRANSPOSE(D1:D199)
    you need to press Ctl + Shirt + Enter since its a array
    and then you can remove duplicate
    hope this will help

    Capture.JPG

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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