+ Reply to Thread
Results 1 to 7 of 7

transpose rows to columns

  1. #1
    Registered User
    Join Date
    01-19-2015
    Location
    Lafayette, LA
    MS-Off Ver
    2007
    Posts
    9

    transpose rows to columns

    I have a spread sheet with column A header row is "GLAccountNumber","Description","Date","Balance" and the data for row 1 would be "1000","Cash","Jan-13","100" then row 2 would be "1000","Cash","Feb-13","200" and so on till Dec-13 then row 14 is the next account number starting at Jan-13 again. This goes on for approx 9500 rows. What i want it transposed to is header row would be "GLAccountNumber","Description","Jan-13","Feb-13" etc thru "Dec-13" and the balances for each month under it so I have one row per account number. What would be the easiest way to accomplish this? Please help

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,085

    Re: transpose rows to columns

    Can you prepare a short sample removing all personal information, it will help to see macros, formulas or others pivot tables
    - Battle without fear gives no glory - Just try

  3. #3
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: transpose rows to columns

    Select range("C2:D" & LastRow) and then select cell E2 and right-click >> Paste Special >> Check Transpose ..
    That's all I think

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

    Re: transpose rows to columns

    Hey kale,

    To attach a sample file, click on the "Go Advanced" button below the message area and then on the Paper Clip Icon above the advanced message area. We need to see your exact layout of data. How about the first 10 rows with the account numbers typed in with some random stuff. That would most likely do.

    Either a VBA solution or perhaps Yasser's answer above will work.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  5. #5
    Registered User
    Join Date
    01-19-2015
    Location
    Lafayette, LA
    MS-Off Ver
    2007
    Posts
    9

    Re: transpose rows to columns

    Quote Originally Posted by YasserKhalil View Post
    Select range("C2:D" & LastRow) and then select cell E2 and right-click >> Paste Special >> Check Transpose ..
    That's all I think
    That makes two rows where row 1 is "Jan-13" thru "Dec-13" then "Jan-13" thru "Dec-13" and so on for about 9500 columns. Not exactly what I wanted. I have attached a sample of what I have vs what I want using only 4 different accounts. I could use the method you described for each account but would have to copy and paste the row it makes for each account for approx 796 different accounts.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    01-19-2015
    Location
    Lafayette, LA
    MS-Off Ver
    2007
    Posts
    9

    Re: transpose rows to columns

    I played around with the pivot table feature and was able to use it to transpose the data. Problem solved. Thanks

  7. #7
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: transpose rows to columns

    Try this code
    Please Login or Register  to view this content.

+ 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] Formula to transpose rows to new columns and columns to new rows in Excel
    By bjnockle in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-26-2014, 06:28 PM
  2. Replies: 1
    Last Post: 01-24-2014, 06:20 PM
  3. Replies: 14
    Last Post: 08-01-2013, 08:48 AM
  4. [SOLVED] Transpose Columns to Rows (automatically inserts new rows)
    By kichkichkich in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-28-2012, 05:38 AM
  5. Replies: 2
    Last Post: 01-01-2012, 05:54 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