+ Reply to Thread
Results 1 to 10 of 10

VBA To Transpose Values In Rows To Single Column

  1. #1
    Forum Contributor
    Join Date
    09-09-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    176

    VBA To Transpose Values In Rows To Single Column

    I have attached a workbook with a sheet named "Convert to Columns 1" where i need an existing VBA macro fixed or a new one created that is currently supposed to take all of the values in row3 (starting with B3) and transpose them to column A, (starting in A3) and as a result, displaying the values "vertically" down the column instead of horizontal across the rows. Then row 4 values, same thing, transpose from row4 to column A and so on.... down the entire range of rows. The vba should also eliminate blanks after it finishes the transpose function... leaving column A populated with all of the transposed values with no blank cells in between any of the values, all the way down column A. Any help would be greatly appreciated. Note, this is a small sample of the main sheet as file size was to large to upload. there will be upwards of 4000 possible rows of values to transpose, the amount of cells with values across columns however will not increase, only certain cells within the rows will change from blank to having values and vice versa... Hopefully this makes sense enough to begin a productive dialog....
    Attached Files Attached Files
    Last edited by Hillster; 12-18-2019 at 11:03 PM.

  2. #2
    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,882

    Re: VBA To Transpose Values In Rows To Single Column

    Using Power Query. Unpivot the columns and delete the blanks. The Mcode is fairly long due to the number of columns you have. Attached is the file.
    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

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

    Re: VBA To Transpose Values In Rows To Single Column

    Simple loop.
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    09-09-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    176

    Re: VBA To Transpose Values In Rows To Single Column

    Alinsidman, thank you for responding. the form control button does not work for some reason. and how do i update the data base and get it to perform the function that created the end result that you've got on a daily basis?

  5. #5
    Forum Contributor
    Join Date
    09-09-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    176

    Re: VBA To Transpose Values In Rows To Single Column

    Hey Jindon, tried your Loop, doesn't work...Might be me...?

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

    Re: VBA To Transpose Values In Rows To Single Column

    Quote Originally Posted by Hillster View Post
    Might be me...?
    Indeed...................
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    09-09-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    176

    Re: VBA To Transpose Values In Rows To Single Column

    This is what i see when i just ran your worksheet VBA...
    Attached Images Attached Images

  8. #8
    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,882

    Re: VBA To Transpose Values In Rows To Single Column

    As indicated in the post #2, this is not VBA, but Power Query. It does not operate from the button you created. Suggest you read the links in my signature to learn about Power Query which is a powerful addition to Excel going back to version 2010. It is designed to manipulate data to a form that is acceptable for analysis.

  9. #9
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,525

    Re: VBA To Transpose Values In Rows To Single Column

    @jindon
    Please Login or Register  to view this content.
    Nifty. Never seen that before.
    Thanks

  10. #10
    Forum Contributor
    Join Date
    09-09-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    176

    Re: VBA To Transpose Values In Rows To Single Column

    alansidman, thank you very much for your assistance, Power Query seems interesting....

+ 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] concatenate 3 rows ,and transpose it into single column in another sheet
    By raj soni in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-25-2016, 06:33 AM
  2. [SOLVED] How to transpose / convert columns and rows into single column?
    By chief_abound in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-09-2015, 08:04 PM
  3. [SOLVED] How to transpose mutilpe rows to a single column?
    By GIS2013 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-17-2013, 07:46 AM
  4. Transpose Multiple Rows into a Single Column
    By vnascimento in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-04-2013, 08:47 AM
  5. [SOLVED] Transpose rows into a single column with additional data
    By AlexRoberts in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-23-2012, 08:13 AM
  6. Transpose muliple rows to single column
    By randinator in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-01-2011, 12:57 PM
  7. Transpose unique values in one column/mult. rows into a single row
    By Wil in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-22-2005, 04:06 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