+ Reply to Thread
Results 1 to 8 of 8

Transpose 2 dimensional to 1 dimensional (single column)

  1. #1
    Registered User
    Join Date
    04-17-2021
    Location
    Dong Nai
    MS-Off Ver
    365
    Posts
    2

    Transpose 2 dimensional to 1 dimensional (single column)

    I have a (probably) simple problem but could not solve it for the life of me. I need to copy 2-dimensional array from one sheet into a single column on another sheet.

    Example:

    Sheet1, data is in a range C2:N225

    needs to be copied (transposed) onto

    Sheet2, in a range D2:D2680

    > First row of the array (Sheet1!C2:N2) goes into Sheet2!D2:D14
    > Second row (Sheet1!C3:N3) goes into Sheet2!D15:D27
    > ... and so forth

    Many thanks!
    Attached Files Attached Files
    Last edited by tran780; 04-17-2021 at 10:19 PM. Reason: My question has answers

  2. #2
    Spammer
    Join Date
    10-23-2012
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2003, Office 365
    Posts
    1,237

    Re: Transpose 2 dimensional to 1 dimensional (single column)

    Transpose is not what you want because it transfers the first row of a matrix to the first column,2nd row to second column etc.

    This is a modification to the code you supplied which may be more useful.
    Please Login or Register  to view this content.
    and adapted to your as stated requirement
    Please Login or Register  to view this content.
    Last edited by Croweater; 04-17-2021 at 04:15 AM.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,896

    Re: Transpose 2 dimensional to 1 dimensional (single column)

    Since you are running 365, you may want to consider Power Query/Get and Transform

    Please Login or Register  to view this content.
    Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

    It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.

    - Follow this link to learn how to install Power Query in Excel 2010 / 2013.

    - Follow this link for an introduction to Power Query functionality.

    - Follow this link for a video which demonstrates how to use Power Query code provided.
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,896

    Re: Transpose 2 dimensional to 1 dimensional (single column)

    Rule 03: Cross-posting Without Telling Us

    Your post does not comply with Rule 3 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Read this to understand why we ask you to do this.

    I have added the crosspost reference for you today. Please comply with this and all our rules in the future

    crosspost: https://www.mrexcel.com/board/thread...olumn.1168368/

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Transpose 2 dimensional to 1 dimensional (single column)

    Quote Originally Posted by tran780 View Post
    Example:

    Sheet1, data is in a range C2:N225

    needs to be copied (transposed) onto

    Sheet2, in a range D2:D2680

    > First row of the array (Sheet1!C2:N2) goes into Sheet2!D2:D14
    > Second row (Sheet1!C3:N3) goes into Sheet2!D15:D27
    > ... and so forth
    Should be Sheet2!D2:D13 as there are only 12 columns.
    Please Login or Register  to view this content.

  6. #6
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,416

    Re: Transpose 2 dimensional to 1 dimensional (single column)

    Here is one more macro for you to consider...
    Please Login or Register  to view this content.
    Last edited by Rick Rothstein; 04-17-2021 at 03:56 AM.

  7. #7
    Registered User
    Join Date
    04-17-2021
    Location
    Dong Nai
    MS-Off Ver
    365
    Posts
    2

    Re: Transpose 2 dimensional to 1 dimensional (single column)

    Thank you for your notice. I'm a new guy of the forum and didn't know Rule 3 (I'm clear now). Thank again

  8. #8
    Spammer
    Join Date
    10-23-2012
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2003, Office 365
    Posts
    1,237

    Re: Transpose 2 dimensional to 1 dimensional (single column)

    So, very apologetic for breaking the rules of the forum but not so much as a 'thank you' to any of the 4 people that offered up a solution to your problem?

+ 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] Convert 2 dimensional array to 1 dimensional
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-19-2018, 05:20 AM
  2. Replies: 2
    Last Post: 01-02-2015, 04:24 PM
  3. [SOLVED] transpose two-dimensional array to single column
    By ajan in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-15-2014, 03:32 PM
  4. multi-dimensional array to single column
    By pcm2004 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-13-2011, 06:50 PM
  5. Creating a 2-dimensional array from a 1-dimensional list
    By guywithcamera in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-27-2008, 06:34 PM
  6. Selecting a single column of a multi-dimensional array
    By hmatharo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-21-2008, 11:10 PM
  7. Replies: 13
    Last Post: 07-19-2006, 12:35 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