+ Reply to Thread
Results 1 to 5 of 5

Rows to colums

  1. #1
    Registered User
    Join Date
    08-11-2009
    Location
    Amsterdam
    MS-Off Ver
    Excel 2007
    Posts
    5

    Rows to colums

    I have a sheet with products and information regarding these products.
    It is consistently build up in a 5-row information block per product like:

    A1: name
    A2: info
    A3: price
    A4: to be deleted
    A5: to be deleted

    What I want:

    A1: name
    B1: description
    C1: Price

    For product 2 it should:
    A6 -> A2
    A7 -> B2
    A8 -> C2
    A9 -> to be deleted
    A10 -> to be deleted ..etcetera

    The Macro should loop until no data is found in the A column. Note: some of the 2nd rows (information) are not filled. They can't be deleted but need to be left empty!

    Any chance?


    Edit: Recording a macro for the first 2 products gives this:

    Please Login or Register  to view this content.
    Only I want it to continue throughout the whole document....
    Last edited by Cheetah; 08-12-2009 at 12:44 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Rows to colums

    Give this a try:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    08-11-2009
    Location
    Amsterdam
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Rows to colums

    Thanks for your input JB.

    This seemed to do the thrick:

    Please Login or Register  to view this content.
    Thanks!
    Last edited by Cheetah; 08-12-2009 at 12:45 AM.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Rows to colums

    Cheetah, please edit your 1st & 3rd posts and wrap the code in code tags as per forum rules.

    Yes, your code will definitely work, mine will execute in about 1/2 the time, but in truth its probably going to be almost instantaneous either way, depending on the length of the data set. So good work, there.
    =======

    If that takes care of your need, be sure to EDIT your original post, click Go Advanced and mark the PREFIX box [SOLVED].

  5. #5
    Registered User
    Join Date
    08-11-2009
    Location
    Amsterdam
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Rows to colums

    Hey JB,

    thanks for your reply. I edited my posts.

    Once again thanks for helping!

+ 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