+ Reply to Thread
Results 1 to 9 of 9

Multi transpose and loop issue

  1. #1
    Registered User
    Join Date
    12-19-2021
    Location
    CapeTown
    MS-Off Ver
    365
    Posts
    5

    Multi transpose and loop issue

    Hi all, I'm new here out of necessity:

    I have a heap of data that is in rows vertically, separated into tables by borders. Each table has a date and a day and night shift along with tasks and associated hours. What I need to do is get all the data into a new format, 1 row per unique Date, shift , ID combination. transpose tasks and allocate hours + some other stuff. The attached example is rather self explanatory I think.

    Here is my example sheet:

    Bellow due to technical issue

    The sheet is largely sanitized of confidential data and been simplified, the principles are my issue. I think I may be over complicating it?

    My approach: Get all dates populated downwards - copy until date changes. Then in the new data area, populate Date , shift and Id rows; then write a loop thing that checks each date, shift, Id combination for that task, if it finds it - allocate hours and then move to next task.

    Let me know what you guys think.
    Feel free to email your sheets with answer methods / formulas.
    Attached Images Attached Images
    Last edited by foxhole784; 12-19-2021 at 07:09 PM.

  2. #2
    Registered User
    Join Date
    12-19-2021
    Location
    CapeTown
    MS-Off Ver
    365
    Posts
    5

    Re: Multi transpose and loop issue

    Posted Sheet ^^
    Attached Images Attached Images
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Multi transpose and loop issue

    Easy with Power Query, but dates can't be just 3,4,5, need the year too.

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

  4. #4
    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,879

    Re: Multi transpose and loop issue

    crossposted: https://www.mrexcel.com/board/thread...issue.1190758/

    Rule 03: Cross-posting Without Telling Us

    Your post does not comply with Rule 3 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Read this to understand why we ask you to do this.

    I have added the crosspost reference for you today. Please comply with this and all our rules in the future
    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

  5. #5
    Registered User
    Join Date
    12-19-2021
    Location
    CapeTown
    MS-Off Ver
    365
    Posts
    5

    Re: Multi transpose and loop issue

    Quote Originally Posted by alansidman View Post
    crossposted:


    Rule 03: Cross-posting Without Telling Us

    Your post does not comply with Rule 3 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Read [ to understand why we ask you to do this.

    I have added the crosspost reference for you today. Please comply with this and all our rules in the future
    Appologies, won't happen again

  6. #6
    Registered User
    Join Date
    12-19-2021
    Location
    CapeTown
    MS-Off Ver
    365
    Posts
    5

    Re: Multi transpose and loop issue

    Quote Originally Posted by DJunqueira View Post
    Easy with Power Query, but dates can't be just 3,4,5, need the year too.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Thank you very much. Will try work this out now. I will come back if there are more problems

  7. #7
    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,879

    Re: Multi transpose and loop issue

    FYI: help with PQ

    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.

  8. #8
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Multi transpose and loop issue

    Video explanation of how it was made in Power Query:
    (I'm very amateur with videos..)

    How to do multi transpose and loop in Power Query Excel

  9. #9
    Registered User
    Join Date
    12-19-2021
    Location
    CapeTown
    MS-Off Ver
    365
    Posts
    5

    Re: Multi transpose and loop issue

    Thank you so much for the help.
    Appologies for getting back to you now. I fell sick

+ 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] Multi-conditional Do While loop in conjunction with a multi-conditional Do Until Loop
    By RavaginRadish in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-07-2020, 12:57 AM
  2. Replies: 4
    Last Post: 05-28-2020, 07:28 PM
  3. Transpose Multi-Criteria
    By tullibee_57 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-19-2019, 02:32 AM
  4. [SOLVED] Multi-Tab If/Then Issue
    By Irukandji81 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-04-2017, 06:20 PM
  5. Writing the loop for updating multi-table MS access file using multi-sheet excel
    By relabz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-29-2016, 03:10 PM
  6. transpose column to a range calculate and transpose to new table loop
    By moshro1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-02-2015, 10:52 AM
  7. Replies: 13
    Last Post: 07-19-2006, 12:35 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