+ Reply to Thread
Results 1 to 8 of 8

Transpose rows to columns: variable amount of colums and corresponding values

  1. #1
    Registered User
    Join Date
    07-09-2012
    Location
    Belgium
    MS-Off Ver
    Excel 2011 for Mac
    Posts
    3

    Transpose rows to columns: variable amount of colums and corresponding values

    Dear all,

    I have an excel sheet with three columns: ARTICLE, OPTION and VALUE.
    I need to rearrange this data automatically so every OPTION becomes a column with VALUE underneath per ARTICLE (ARTICLE has to become a unique row)

    I've attached the worksheet (limited to two ARTICLES), and the data how I'd like it to look afterwards.
    The amount of rows per ARTIKEL can vary, it's not always the same. It is important that the VALUE sticks with the correct OPTION.

    I've tried transposing but can't seem to get it to work without jumbling up the data
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,552

    Re: Transpose rows to columns: variable amount of colums and corresponding values

    try
    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-09-2012
    Location
    Belgium
    MS-Off Ver
    Excel 2011 for Mac
    Posts
    3

    Re: Transpose rows to columns: variable amount of colums and corresponding values

    Apparently the code is not Mac compatible (I should have mentioned that, has to run on Office for Mac 2011)
    I've tried to google for the mac alternative for the CreateObject function (which is ActiveX) but didn`t get any wiser.

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,552

    Re: Transpose rows to columns: variable amount of colums and corresponding values

    No, it is only for Windows...

    I will try another way.

  5. #5
    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: Transpose rows to columns: variable amount of colums and corresponding values

    Try this formula approach

    Some of your values are blank and some are a single space i.e. " ", others have trailing spaces.
    When the value is blank the formula will return 0 (zero), it's up to you how you want to handle this.

    [EDIT]
    This should work for all versions of Excel, including macs that don't use VBa, e.g. 2008.
    Attached Files Attached Files
    Last edited by Marcol; 07-10-2012 at 10:16 AM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,552

    Re: Transpose rows to columns: variable amount of colums and corresponding values

    try
    Please Login or Register  to view this content.

  7. #7
    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: Transpose rows to columns: variable amount of colums and corresponding values

    Probably better with this non-array version of post #5
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    07-09-2012
    Location
    Belgium
    MS-Off Ver
    Excel 2011 for Mac
    Posts
    3

    Re: Transpose rows to columns: variable amount of colums and corresponding values

    I tried the different proposed solutions and found Marcol's version in post #7 to be best suited.
    Thank you both for your efforts!

+ 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