+ Reply to Thread
Results 1 to 7 of 7

VBA Help: transpose data, delete transposed data

  1. #1
    Registered User
    Join Date
    07-26-2014
    Location
    USA
    MS-Off Ver
    2013
    Posts
    11

    VBA Help: transpose data, delete transposed data

    I have a database file that did not export correctly.

    I need to Transpose a5:a18 into b4:q4

    After transposing delete a5:a18

    do that for every owner's name.

    A2:Q2 has been done manually to show you the final product.

    FYI: The original file has about 40k rows. So if possible please structure your code to accommodate larger files. Ty.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,533

    Re: VBA Help: transpose data, delete transposed data

    Please Login or Register  to view this content.
    Sheet1 copied to "test" which a has the result.

    In "Sheet1" there are 2 entries with 16 lines so I deleted the last entry of each. If 16 entries is valid then code needs to be amended to test for variable length entries.
    Last edited by JohnTopley; 12-31-2023 at 05:41 AM.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,517

    Re: VBA Help: transpose data, delete transposed data

    Please Login or Register  to view this content.
    Last edited by Sintek; 12-31-2023 at 04:31 AM.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,533

    Re: VBA Help: transpose data, delete transposed data

    Please Login or Register  to view this content.
    Both macros in the attached
    Attached Files Attached Files
    Last edited by JohnTopley; 12-31-2023 at 06:41 AM.

  5. #5
    Registered User
    Join Date
    07-26-2014
    Location
    USA
    MS-Off Ver
    2013
    Posts
    11

    Re: VBA Help: transpose data, delete transposed data

    Thanks for helping but data all over the place.

  6. #6
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,517

    Re: VBA Help: transpose data, delete transposed data

    data all over the place.
    I am guessing then that your actual file is not a constant group of 15 data points...Is this so...
    Is there sometimes 15, then 16, then 15 etc etc
    Perhaps you should upload a sample file reflecting actual setup...
    Last edited by Sintek; 12-31-2023 at 11:38 AM.

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,533

    Re: VBA Help: transpose data, delete transposed data

    In "Sheet1" there are 2 entries with 16 lines so I deleted the last entry of each. If 16 entries is valid then code needs to be amended to test for variable length entries.
    I did alert you to this in post #2!

    Looking at your posted file there is no obvious delimiter: possibly a numeric value following the Zip Code ?
    Last edited by JohnTopley; 12-31-2023 at 01:35 PM.

+ 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. Excel Macro to delete rows and then transpose data
    By aiexunder777 in forum Excel Programming / VBA / Macros
    Replies: 32
    Last Post: 10-08-2023, 10:05 PM
  2. [SOLVED] Duplicate Data in Rows grouped with adjacent data transposed into Column
    By KBarnard01 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-22-2020, 10:23 AM
  3. [SOLVED] Transpose vba + copying cell formatting to transposed range
    By Jesseke in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-29-2017, 01:29 PM
  4. [SOLVED] delete duplicates & transpose secondary data
    By ljb24 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-04-2016, 02:26 AM
  5. [SOLVED] Transpose with cells merged and transposed it back
    By daveglion in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 12-03-2012, 08:18 PM
  6. Replies: 2
    Last Post: 02-15-2005, 07:12 PM
  7. Transpose into a _working_ transposed array
    By Fred Holmes in forum Excel General
    Replies: 1
    Last Post: 01-13-2005, 08:06 PM

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