+ Reply to Thread
Results 1 to 6 of 6

Transpose the column values into row base on a certain values in a column

  1. #1
    Registered User
    Join Date
    12-16-2020
    Location
    italy
    MS-Off Ver
    365,2019
    Posts
    5

    Transpose the column values into row base on a certain values in a column

    Hi all,

    I have a table that looks like the below "Input" and i want to transpose it into a structure like the "Output"

    I need to take the unique values in the column "ID". And print it as once even how many time it appears the column till "country" should print once and the values in the "Rate" column should be print in rows until in available for the same "ID". when the value in the "ID" column changes, it the respected values for the next "ID" should start a print in the next row.


    Please see the image for reference.

    Thanks in advanceexcel.PNG

    Undeclared cross post added by GK:

    https://www.mrexcel.com/board/thread...olumn.1163760/
    Last edited by Glenn Kennedy; 03-05-2021 at 12:03 PM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,067

    Re: Transpose the column values into row base on a certain values in a column

    Welcome (back) to the forum.

    Thanks for your question. However, we have just found out that you have posted the same question elsewhere.... and haven't told us. Feel free to cross-post on other sites...

    But. Every forum has its rules. Please see Forum Rule #3 about cross-posting. So.

    Do not keep it a secret. We all are willing to give you our time, freely. However, some of us get very annoyed if we waste our time developing a solution for you, when you already have a nice solution elsewhere. All we ask is that you show us some respect and tell us:

    1) if you have cross-posted, and

    2) the URL of the cross posts.

    That way, those of us who don't want to waste their time can quickly check to see if you're already happy with another solution.

    (Note: this requirement is not optional. No help to be offered until the link is provided.)
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: Lá fhéile Pádraig sona dhaoibh

  3. #3
    Registered User
    Join Date
    12-16-2020
    Location
    italy
    MS-Off Ver
    365,2019
    Posts
    5

    Smile Re: Transpose the column values into row base on a certain values in a column

    Hi, Glenn,

    I'm really sorry, though I'm a newbie to the forums. I'm not aware of the rules in the forum. My mistake and it won't happen again. And by the way, I have attached the link to the cross-post with my query.

    Thank you

  4. #4
    Registered User
    Join Date
    12-16-2020
    Location
    italy
    MS-Off Ver
    365,2019
    Posts
    5

    Re: Transpose the column values into row base on a certain values in a column

    Hi Glenn,

    I tried to attach the cross-post URL. but its throwing error. I'm lost..

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,067

    Re: Transpose the column values into row base on a certain values in a column

    Has this been solved on Mr Excel??

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,897

    Re: Transpose the column values into row base on a certain values in a column

    Here is an alternative solution to those you received over at MrE. I used Power Query and transformed the Data using a Pivot Table within PQ

    Here is the Mcode and the file is attached

    Please Login or Register  to view this content.
    Excel 2016 (Windows) 32 bit
    A
    B
    C
    D
    E
    F
    G
    1
    ID City Country 1 2 3 4
    2
    1
    Rome Italy
    1255
    215
    25486
    3
    2
    Paris France
    6558
    8142
    4
    3
    Frankfurt Germany
    9851
    31546
    51568
    1548
    5
    4
    Milan Italy
    5994
    9666
    Sheet: Table1

    Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

    It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.

    - Follow this link to learn how to install Power Query in Excel 2010 / 2013.

    - Follow this link for an introduction to Power Query functionality.

    - Follow this link for a video which demonstrates how to use Power Query code provided.
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. Transpose values in column to rows, and split cell values to extend column
    By SAMMM in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-03-2015, 12:52 AM
  2. [SOLVED] Transpose a long column into delimiters separated values according to values in input box
    By prkhan56 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-27-2014, 01:32 PM
  3. [SOLVED] Transpose Column to Row with formatting and values
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-07-2013, 07:19 PM
  4. [SOLVED] How can I takeover values from a column and transpose in to a row?
    By Danny77 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-31-2013, 09:42 AM
  5. Extracting Maximum values of a column base on the multiple ranges in rows
    By sepantafa in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-11-2012, 03:06 AM
  6. Transpose values in each row into the same column
    By Lifeseeker in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 02-20-2012, 04:28 PM
  7. How to extract duplicate rows base on multiple column values
    By masai_chadi in forum Excel General
    Replies: 12
    Last Post: 09-25-2009, 04:31 PM

Tags for this Thread

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