+ Reply to Thread
Results 1 to 2 of 2

Data not sorting or flowing correctly

  1. #1
    Registered User
    Join Date
    11-21-2024
    Location
    US
    MS-Off Ver
    MS 365 Bersion 2409
    Posts
    4

    Data not sorting or flowing correctly

    I have a file that uses a master tab to feed data into other tabs. In the master tab, managers are responsible for logging the total hours an employee worked in a 4 week span (WK1-WK4). The manager must then go into the separate weekly tabs and log the total hours the employee logged each day for that given week. So far I’ve found a few issues: my data is feeding properly to the broken out tabs, but I am unable to filter the data in the breakout tabs because I am getting an array error. Also, if I already have logged employee hour data in the weekly breakout tabs and then add a new employee the data inputs for employees already on the sheet are not flowing to the correct line if someone is bumped down a row (IE the breakout data stays where it was originally input and will not flow with the persons name). Ideally if a new employee is added to the master tab they are auto sorted in alphabetical order by Office then Last name and then that sorting is also done on the broken out tab. Additionally, when a new person is added the data already entered into the broken out tabs realigns with the correct person automatically without a refresh or re-sort. Please help if this makes sense!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,831

    Re: Data not sorting or flowing correctly

    To me it would seem easier to have the managers fill out the weekly tabs and then aggregate the data using Power Query and Power Pivot to produce the pivot table on the EmpHours sheet so that the data does not become misaligned..
    1. Produce a list of distinct ID's using the following Power Query code:
    Please Login or Register  to view this content.
    2. Make connections to both the WK1 and WK2 tables using:
    Please Login or Register  to view this content.
    3. Append the connections to the two tables using:
    Please Login or Register  to view this content.
    4. Load the UniqeIDs table and the Append table to the data model
    5. In the Diagrams View of the data model produce a connection between the Employee ID fields of the two tables
    6. Produce the Pivot Table seen on the EmpHours sheet
    Note that when new data is added to either the WK1 or WK2 tables you can select a cell in the Pivot Table and then refresh.
    Note that connections will need to be produced for tbl_WK3 and tbl_WK4 when that data becomes available.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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] Sorting not working correctly
    By ShotyMcFat in forum Excel General
    Replies: 5
    Last Post: 08-28-2021, 04:44 AM
  2. Not sorting correctly
    By chriswrcg in forum Excel General
    Replies: 7
    Last Post: 07-30-2021, 10:14 AM
  3. Obtain a 'flowing' average from blocks of data
    By JR73 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-16-2021, 03:44 PM
  4. [SOLVED] Power Query Sorting by Date not sorting correctly
    By kersplash in forum Excel General
    Replies: 5
    Last Post: 08-20-2018, 02:59 AM
  5. VB data sorting macro unable to sort correctly
    By Ace of Clubs in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-13-2009, 01:46 AM
  6. Flowing Month Data into a chart based on Weeks?
    By BuzzOffSweetheart in forum Excel General
    Replies: 2
    Last Post: 03-02-2009, 12:36 PM
  7. Not sorting correctly
    By Josh_123456 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-10-2008, 03:48 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