+ Reply to Thread
Results 1 to 7 of 7

Help convert a table/range into another

  1. #1
    Registered User
    Join Date
    05-13-2024
    Location
    Portugal
    MS-Off Ver
    2016
    Posts
    4

    Help convert a table/range into another

    Hi everyone!

    First of all thank you so much to all the persons that go out of their way and are here to help others and share their expertise
    It is really noble that people spend their time and resources to help others.. there is hope for this world yet

    I too try to help a little bit on some fields where I can, like electronics and old computer like the Vogons forum...

    anyway I would like to ask if there is a simple way to convert a excel table (or data range) into another

    In my company I work with schedules and the departments send me schedules in a format that is very difficult for me to use and I would like to have a simple automated tool to convert the data
    Basically I need to extract unique values from the data and make a list of them and convert row "hearers" into data

    Here is an example sheet of what I am talking about


    Thank you very much

    Nuno
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,463

    Re: Help convert a table/range into another

    Your example file doesn't really show what you want to achieve with your data - perhaps you can add an "after" sheet which can make this clearer.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    05-13-2024
    Location
    Portugal
    MS-Off Ver
    2016
    Posts
    4

    Re: Help convert a table/range into another

    Hi Pete thank you for the help

    Well I did include the "after" on the sheet :-)

    it is the rightmost section... the one where the days of the month are on a single row instead of several "weekly" rows

    I wrote "turn this" into "THIS"

    Thank you
    Last edited by AliGW; 05-24-2024 at 07:09 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,463

    Re: Help convert a table/range into another

    Sorry, when I opened the file I did not see the top few rows.

    Pete

  5. #5
    Registered User
    Join Date
    05-13-2024
    Location
    Portugal
    MS-Off Ver
    2016
    Posts
    4

    Re: Help convert a table/range into another

    Anyone lol ?

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,901

    Re: Help convert a table/range into another

    Using Power Query to unpivot your data and get it normalized and then using Power Pivot to present your expected results.
    1. Select each range of data your receive and convert to a Table. Highlight the range and select Ctl+T
    2. Bring each into Power Query and Append each to the other. Clean up and unpivot.
    3. Close and Load each to Power Pivot.
    4. Create your pivot table and build a measure to concatenate the events for same day.

    All above is shown in the attached file.

    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.

    Measure:
    Please Login or Register  to view this content.
    To build the measure, look at this tutorial.
    https://www.sfmagazine.com/articles/...a-pivot-table/

    Here is the Mcode to unpivot your three tables.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by alansidman; 05-15-2024 at 12:30 PM.
    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

  7. #7
    Registered User
    Join Date
    05-13-2024
    Location
    Portugal
    MS-Off Ver
    2016
    Posts
    4

    Re: Help convert a table/range into another

    wow !

    thank you so much Alansidman

    I will analyse your solution :-)

+ 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] VBA: Convert Table to a Range
    By andrewc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-27-2021, 09:19 AM
  2. Convert Range to Table for a specific range in each selected sheet
    By Wojtek1977 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-16-2019, 05:46 AM
  3. Excel 2016 convert table to range
    By SEJ50 in forum Excel General
    Replies: 10
    Last Post: 03-16-2018, 10:05 AM
  4. Convert through Macro an Excel Table to a Range
    By GRajagopalan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-14-2016, 10:22 AM
  5. Replies: 3
    Last Post: 06-05-2015, 03:13 AM
  6. Convert Table Format to Range Using VBA
    By mybest in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-24-2014, 12:48 AM
  7. [SOLVED] need code that will convert a table to a range
    By RuthMP in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-18-2014, 10:09 AM

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