+ Reply to Thread
Results 1 to 9 of 9

VBA to transpose data on multiple sheets from single column to rows

  1. #1
    Registered User
    Join Date
    03-05-2010
    Location
    Essex, England
    MS-Off Ver
    Excel 2003
    Posts
    62

    VBA to transpose data on multiple sheets from single column to rows

    Hi Everyone,

    I would like to transpose rows of data that are separated by blank lines on multiple sheets onto a single summary worksheet in columns.

    There could be multiple sheets so I need it to loop through the multiple worksheets and the dataset includes tabs and in some instances what would be the column row name and it would be helpful if these could be removed

    I don't know where to start and would be grateful for any help :-)

    Thanks in advance
    Bob
    Attached Files Attached Files
    Last edited by pixifaery; 12-08-2022 at 05:05 AM.

  2. #2
    Forum Expert
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    1,386

    Re: VBA to transpose data on multiple sheets from single column to rows

    How about this one

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-05-2010
    Location
    Essex, England
    MS-Off Ver
    Excel 2003
    Posts
    62

    Re: VBA to transpose data on multiple sheets from single column to rows

    Hi JEC,

    Thanks very much for your help.

    When I run the code it stops at this line:

    For Each sh In Sheets

    It doesn't open the debugger just highlights the row in yellow.

    Best wishes
    Bob

  4. #4
    Valued Forum Contributor
    Join Date
    06-27-2010
    Location
    sYRIA
    MS-Off Ver
    Excel 2013
    Posts
    669

    Re: VBA to transpose data on multiple sheets from single column to rows

    @pixifaery
    Try to add bolded line
    Please Login or Register  to view this content.

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

    Re: VBA to transpose data on multiple sheets from single column to rows

    pixifaery,
    try
    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    1,386

    Re: VBA to transpose data on multiple sheets from single column to rows

    Try thisworkbook.sheets

  7. #7
    Registered User
    Join Date
    03-05-2010
    Location
    Essex, England
    MS-Off Ver
    Excel 2003
    Posts
    62

    Re: VBA to transpose data on multiple sheets from single column to rows

    Hi Everyone,

    Thanks very much for your help. They all work but the best solution is from jindon because the code loops through extra rows for 3 issues or more. That was my fault though because I didn't specify that clearly in my request.

    Thanks again for your help :-). You are all legends!!
    Bob

  8. #8
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: VBA to transpose data on multiple sheets from single column to rows

    Hi pixifaery,

    Your question made me a better programmer. You have a very strange set of data on your sheets with lots of blank spaces. This code should clean it up on the Summary sheet.
    Please Login or Register  to view this content.
    VBA Sheets to Summary.xlsm
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  9. #9
    Registered User
    Join Date
    03-05-2010
    Location
    Essex, England
    MS-Off Ver
    Excel 2003
    Posts
    62

    Re: VBA to transpose data on multiple sheets from single column to rows

    Hi Marvin,

    Thanks for your code! I get a run time error at the following line:

    Set rg1 = ws1.Range("A:A").Find("*Order No:*").CurrentRegion.

    This post is solved (and I will mark it that way) but I'm happy if you want to keep working on this and I'll keep checking back :-)

    Kind regards
    Bob

+ 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: 5
    Last Post: 03-08-2020, 02:00 AM
  2. [SOLVED] Transpose multiple rows of data into a single row
    By pixifaery in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-06-2016, 05:53 PM
  3. [SOLVED] Macro to transpose multiple rows to a single column
    By Gup in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 10-12-2014, 03:05 PM
  4. Transpose multiple rows of data to a single row
    By dansteg in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-24-2014, 03:09 PM
  5. 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
  6. [SOLVED] Copy and Transpose Data From Single Row to Multiple Rows
    By delinia in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-08-2013, 06:26 PM
  7. [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

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