+ Reply to Thread
Results 1 to 8 of 8

Transpose one of two columns only

  1. #1
    Registered User
    Join Date
    02-12-2010
    Location
    NY
    MS-Off Ver
    Excel 2019
    Posts
    47

    Transpose one of two columns only

    Hi,

    The data I have now is in following format:

    Company Committee
    Microsoft Audit
    Micorsoft Remuneration
    IBM Nominating
    IBM Finance
    IBM 401K
    Zynga Compensation


    This is just a sample. Each company has from 1 to possibly 5 committees.

    What I need is for the file to look as following:

    Company Committee1 Committee2 Committee3
    Micorsoft Audit Remuneration
    IBM Nominating Finance 401K
    Zynga Compensation

    So basically, one row per company, with committees in separate columns.

    Thank you very much in advance!

  2. #2
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Transpose one of two columns only

    Hi,

    See below file, yellow cells has solution. Note the formula's in the cells are array formula, which must be confirmed with Ctrl+Shift+Enter.

    Edit: Also note to get Unique company name I had use Remove duplicate option from Data Tab to reduce calculation load for a bigger data set, but if you required that can also be done through formulas.
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Transpose one of two columns only

    Hi,

    an example: in A2:A10 Companies in B2:B10 Commitees

    try to copy in D2: after copied the formula you have to confirm it with control+shift+enter (see on Google Excel array formulas)

    excel 2003 formulas

    =INDEX($A$2:$A$10,SMALL(IF(ISNUMBER(MATCH(ROW($A$2:$A$10)-1,MATCH($A$2:$A$10,$A$2:$A$10,0),0)),MATCH($A$2:$A$10,$A$2:$A$10,0),""),ROWS(A$1:A1)))

    and copy down the formula to get the list in D2:D?

    ----------------------

    in E2 to be confirmed with control+shift+ enter and copied to the right

    =INDEX($B$2:$B$10,SMALL(IF($A$2:$A$10=$C2,ROW($A$2:$A$10)-1),COLUMNS($A$1:A$1)))


    Hope it helps
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Transpose one of two columns only

    This might suit your needs.

    To get the company names:
    Array enter in E2 and copy down. (array to be in E1 to H4)

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    To get the committee values:
    Array enter in F2 and copy across and down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by newdoverman; 10-22-2014 at 02:08 PM.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  5. #5
    Registered User
    Join Date
    02-12-2010
    Location
    NY
    MS-Off Ver
    Excel 2019
    Posts
    47

    Re: Transpose one of two columns only

    Thanks guys! This worked great....for a small sample I provided. However, for the life of me I couldnt understand how to make it work for a larger list.
    For example, let's say there are 8 rows of companies and committees, and not 7:

    =IFERROR(INDEX($B$2:$B$7,SMALL(IF($A$2:$A$7=$E2,ROW($A$2:$A$7)-MIN(ROW($A$2:$A$7))+1),COLUMNS($A$1:A1))),"")

    I tried changing "7"s in the above to "8" but it just wouldnt work. What am I missing?

    Thanks again!!!

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Transpose one of two columns only

    Here are the two formulae that are used in my solution expanded to accommodate to row 2000. These formulae are entered with Ctrl + Shift + Enter (array formula)

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    02-12-2010
    Location
    NY
    MS-Off Ver
    Excel 2019
    Posts
    47

    Re: Transpose one of two columns only

    Thank you so much!!!

  8. #8
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Transpose one of two columns only

    You're welcome.

    If you want to change the range for your data, change the "2000" value wherever it is in both formulae and enter with Ctrl + Shift + Enter.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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] Macros to transpose from multiple columns to selected columns and maintaining cell format
    By rrajnish in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-09-2013, 01:45 PM
  2. [SOLVED] Transpose 2 Columns into Multiple Columns per Range of Cells
    By ub3rm0nk3y in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-31-2013, 02:30 PM
  3. MAcro to - copy, transpose, text to columns, remove column A, combine all columns in 1
    By galvinpaddy in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 02-07-2013, 08:48 AM
  4. Transpose Columns To Rows (with Variable Columns)
    By G.HendriX in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-08-2011, 08:40 PM
  5. transpose row to 2 columns
    By Scrungie in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-18-2005, 08:10 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