+ Reply to Thread
Results 1 to 3 of 3

How to programatically transpose Rows into Columns

  1. #1
    Registered User
    Join Date
    12-21-2010
    Location
    Lahore, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    73

    Cool How to programatically transpose Rows into Columns

    Hi All,

    Here is a sample sheet. I am interested in doing following steps by VBA code.

    1. Delete all ROWS in which Column AB is empty.
    2. Select and Copy Column AB of all ROWS in which Column AB has text starting string "R000-" or "R020-" or "R040-" or .... upto ""R580-".
    3. PASTE these ROWS in separate sheet.
    4. Delete duplicate ROWS.
    5. Delete the first 5 characters (headers) of all these rows.
    6. Convert the Text-to-column conversion of the text at fixed width of length 3.
    7. This will give us 20 columns, since the length of the text is 60 numeric characters.
    8. Transpose these into 1 column. Ultimately the column will have 600 entries.

    Any help would be highly appreciated.
    Attached Files Attached Files
    Last edited by naeemdotcom; 01-09-2011 at 06:51 AM. Reason: missed some info.

  2. #2
    Registered User
    Join Date
    12-21-2010
    Location
    Lahore, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    73

    Re: How to programatically transpose Rows into Columns

    Here is the sample-done file.

    In sheet 2 the selected data from Column AB is pasted after removing empty and duplicate rows. The data is also converted from Text-to-Column at fixed width of length 3, as explained the steps of the original post.

    In sheet 3 the ROWS are transposed into a single column. Just the first 4 rows are done just to show the result.


    So in a nutshell i need to get sheet 3 from sheet 1 using VBA code.

    Any help would be greatly appreciated.
    Attached Files Attached Files

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: How to programatically transpose Rows into Columns

    Try recording a macro and take it from there?

    This is your third thread, all of which can be solved without macros.
    The previous two are apparently solved, but you haven't marked then as so.

    This forum is intended to help people to learn Excel and the techniques involved.
    It is not a free pool of agency workers that do your work for you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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