+ Reply to Thread
Results 1 to 6 of 6

Rows to colums

  1. #1
    Registered User
    Join Date
    06-12-2014
    Posts
    3

    Rows to colums

    Need urgent help on an excel sheet moving rows to colums:

    I have an excel sheet like below:

    Alarm 1
    Group N7900
    Event_Severity All
    Event_Name volume-space-reserve-nearly-depleted
    Repeat_Notify Yes
    Repeat_Interval 1800
    Email_Addresses [email protected]
    Alarm 2
    Group N7900
    Event_Severity All
    Event_Name volume-space-reserve-depleted
    Repeat_Notify Yes
    Repeat_Interval 1800
    Email_Addresses [email protected]

    And wish the output to be like:

    Alarm Group Event_Severity Event_Name Repeat_Notify Repeat_Interval Email_Addresses
    1 N7900 All volume-space-reserve-nearly-depleted Yes 1800 [email protected]
    2 N7900 All volume-space-reserve-depleted Yes 1800 [email protected]

    Any help will be much appreciated.

  2. #2
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    Re: Rows to colums

    if you do not have lots of rows, just copy the values starting with alarm 2 to the next available column (probably C) and so on until you finish moving the data. then select all the data (7 rows by x columns), copy and then paste-transpose.

    if you have lots of rows, then you probably need a VBA code (not complicated if you have the same number of rows for each alarm)
    Click on the star if you think I helped you

  3. #3
    Registered User
    Join Date
    06-12-2014
    Posts
    3

    Re: Rows to colums

    Hi adyteo,

    Thank you for your reply.
    My list contains around 60 alarms all with the same rows. So converting each alarm from rows to columns can be performed although a better way to do it would be welcome. No idea about VBA code

  4. #4
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    Re: Rows to colums

    Attached is the excel with VBA. what you need to do is to copy your data into column A and run the code (Alt-F8 and then select the "TransposeText" macro and click Run
    Book1.xlsm
    Thank you for the reputation given already .

  5. #5
    Registered User
    Join Date
    06-12-2014
    Posts
    3

    Re: Rows to colums

    Thank you adyteo for writing the macro. I have edited the macro to include 2 more fields and tested it. Everything works perfect as I needed. Your help is much appreciated.

  6. #6
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    Re: Rows to colums

    If your problem has been solved, please mark the thread as SOLVED.

+ 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. Rows to colums
    By Cheetah in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-12-2009, 12:46 AM
  2. How can I sort colums and rows when the rows always change?
    By jamesstorx in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-09-2007, 03:47 PM
  3. How do change rows to colums AND columns to rows
    By Colleen A in forum Excel General
    Replies: 7
    Last Post: 12-29-2005, 08:45 PM
  4. Print few rows with many colums so that rows wrap on printed pages
    By usfgradstudent31 in forum Excel General
    Replies: 1
    Last Post: 10-20-2005, 10:05 AM
  5. [SOLVED] colums and rows ...
    By Star in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-02-2005, 10:06 PM

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