+ Reply to Thread
Results 1 to 9 of 9

Convert Three Columns to Table

  1. #1
    Forum Contributor
    Join Date
    10-07-2015
    Location
    Tehran - Iran
    MS-Off Ver
    2013
    Posts
    111

    Convert Three Columns to Table

    I have three columns "x", "y" and "z" and I want to convert data of these columns to a table where "x" is vertical, "y" is horizontal. My question is: How can have data of column "z" on this table? Is there any formula? (Please see attached excel file)
    Thanks in advance for your cooperation.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Convert Three Columns to Table

    Try this formula in F3, then drag right and down to fill the table.

    =IF(ROWS(E$3:E3)=COLUMNS($F2:F2),INDEX($C$3:$C$15,ROWS(E$3:E3)),"")

    edit:-

    It could be done with a pivottable, but the columns would be in ascending order, not the original order. Also it would not work correctly if there are any duplicates in x or y.
    Last edited by jason.b75; 02-17-2019 at 06:38 AM.

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Convert Three Columns to Table

    Please try at F3 drag across and down

    =IF(($A3=$E3)*($B3=F$2),$C3,"")

  4. #4
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Convert Three Columns to Table

    I can't remember if excel 2013 supports power query, if it does, then that is an alternative option.

    Here's the M code for the query, you will need to format the source data as a table first.
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    10-07-2015
    Location
    Tehran - Iran
    MS-Off Ver
    2013
    Posts
    111

    Re: Convert Three Columns to Table

    Quote Originally Posted by jason.b75 View Post
    Try this formula in F3, then drag right and down to fill the table.

    =IF(ROWS(E$3:E3)=COLUMNS($F2:F2),INDEX($C$3:$C$15,ROWS(E$3:E3)),"")

    edit:-

    It could be done with a pivottable, but the columns would be in ascending order, not the original order. Also it would not work correctly if there are any duplicates in x or y.
    Thank you. Your formula as well as works.

  6. #6
    Forum Contributor
    Join Date
    10-07-2015
    Location
    Tehran - Iran
    MS-Off Ver
    2013
    Posts
    111

    Re: Convert Three Columns to Table

    Thanks. Your formula is also an answer for my question. It as well as works

  7. #7
    Forum Contributor
    Join Date
    10-07-2015
    Location
    Tehran - Iran
    MS-Off Ver
    2013
    Posts
    111

    Re: Convert Three Columns to Table

    Hi Bo-RY

    Thanks. Your formula is also an answer for my question. It as well as works.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Convert Three Columns to Table

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


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  9. #9
    Forum Contributor
    Join Date
    10-07-2015
    Location
    Tehran - Iran
    MS-Off Ver
    2013
    Posts
    111

    Re: Convert Three Columns to Table

    Thanks. I will test it too.

+ 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] Take a table and convert to columns
    By gensher in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-28-2017, 01:56 PM
  2. [SOLVED] Convert two columns to a table
    By jomili in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-08-2015, 12:47 PM
  3. Convert some columns to pivot table rows?
    By dalfiuss in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 06-02-2015, 02:54 PM
  4. [SOLVED] Convert table with multiple header columns into a pivotable table
    By jasonleewkd in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-20-2013, 03:20 AM
  5. [SOLVED] Convert matrix table into columns
    By Reny in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-11-2012, 05:09 AM
  6. convert table into three columns
    By panamajack in forum Excel General
    Replies: 8
    Last Post: 08-27-2009, 06:46 PM
  7. Replies: 5
    Last Post: 07-31-2005, 02:05 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