+ Reply to Thread
Results 1 to 9 of 9

Sorting time card Data

  1. #1
    Registered User
    Join Date
    05-29-2015
    Location
    Stoke-On-Trent, England
    MS-Off Ver
    2010
    Posts
    40

    Sorting time card Data

    Hi All

    I am hoping that someone out there will be able to help me with a problem that I am trying to resolve.

    I am trying to sort out data from a Time & Attendance system so that it is all nicely grouped together and worked with greater ease. This is proving to be a problem due to the formatting of the report when exported. Changing the report is not an option.

    The amount of data that is exported varies from week to week so whatever code is built would need to be dynamic enough to take this in to account

    I have attached a workbook with 2 work sheets. The sheet titled raw data is the data in its rawest format. The second sheet Sorted Data is what I am looking to achieve.

    A few things to note would be
    1. The rest day shift needs to be on the same line for ease of use
    2. The number of hours that have been worked need to be populated from the raw data tab rather than calculated as the system this is extracted from applies working rules/deductions of time
    3. The basic column is required as this is the total amount of hours worked in a week
    4. Ideally, I would like to be able to work with the data in the total rows so that I can do some sense checks

    I know that I am asking a lot, any help that can be offered would be greatly appreciated!

    Thanking you all in advance

    D
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    01-10-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    651

    Re: Sorting time card Data

    man... that is a hideous export.

    will it always be a single week, Sun-Sat? so row 1 of the output can always be the same, and row 2 will key off the dates provided?

    looks like WINSCR can be ignored, right?

    For your Payroll #'s in Sheet2, safe to assume you just put in dummy values but you actually want the values pulled from column D in Sheet1, right?

    it looks like there's an extra column in between Tue and Wed on the Raw Data sheet... is that always going to be there?

    it looks like there is an extra row in between some of the Person, Name entries... is there any rhyme/reason to when that would be the case?
    Last edited by simarui; 03-20-2018 at 12:27 PM.
    Hope I could help - if your post has been solved don't forget to mark it as such.

    Clicking the * below is a great way to say thanks!

    "Drowning in 10 feet of water isn?t any different than drowning in a million feet. And if you can swim, it doesn?t matter how deep the ocean is. At some level, once you realize you?re in water that?s too deep to stand, you have to have a very different approach," - Joi Ito

  3. #3
    Registered User
    Join Date
    05-29-2015
    Location
    Stoke-On-Trent, England
    MS-Off Ver
    2010
    Posts
    40

    Re: Sorting time card Data

    Quote Originally Posted by simarui View Post
    man... that is a hideous export.

    will it always be a single week, Sun-Sat? so row 1 of the output can always be the same, and row 2 will key off the dates provided?

    looks like WINSCR can be ignored, right?

    For your Payroll #'s in Sheet2, safe to assume you just put in dummy values but you actually want the values pulled from column D in Sheet1, right?

    it looks like there's an extra column in between Tue and Wed on the Raw Data sheet... is that always going to be there?

    it looks like there is an extra row in between some of the Person, Name entries... is there any rhyme/reason to when that would be the case?

    Hi

    Thank you for your quick reply. That was my first thought when I saw how the data exported. In answer to the question:

    The week will always be Sunday to Saturday, Winscr can be ignored as this field has no value.

    I did use dummy numbers as it was quicker than getting all of the data from the raw data sheet.

    In all the previous reports that I have check the additional column seems to occur between Tue and Wed (not sure why....) and finally as for the additional row in between person, Name entries I have gone through an number of files whilst looking at this and I do not seem to be able to find a logic as to how this would work. it basically seems to be a random occurrence for which I have no explanation.

    When the report is originally exported it is exported with merged cells etc, the version that is there is with all of the formatting removed as when I have worked with merged cells in the past in formulas and VBA it has caused more problems than solved.

    Once again thank you for your help with this.

    D

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Sorting time card Data

    Providing that the columns remain constant from one export to the next, the following may be helpful.
    1) Cells highlighted in a light blue are manually populated and assumed to remain the same for each report.
    2) The date of Sunday is populated using: =Sheet1!I2
    3) The remaining dates are populated by adding one to the date in C2 etc.
    4) Starting with row 3 the formula that populates the Name column is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    5) Starting with row 3 the formula that populates the Payroll column is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    6) Staring with row 3 the formula that populates the Start columns* is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    7) Starting with row 3 the formula that populates the End columns* is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    8) Starting with row 3 the formula that populates the Basic column is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    *Saturdays Start column has a slightly modified formula as the values are found in columns BM and BN and there is no formula in the End column as there is no corresponding data on sheet1.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    05-29-2015
    Location
    Stoke-On-Trent, England
    MS-Off Ver
    2010
    Posts
    40

    Re: Sorting time card Data

    Hi

    Thank you for your reply.

    I have had a play with this and it seems to be working well for me for the most part. If I want to extend the ranges that it is referencing though how would I do that?

    Thanks again.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Sorting time card Data

    You're Welcome and thank you for the feedback.
    I assume that you are asking about extending the range of rows, as in there are more names on sheet 1. To account for this change any reference reading $200 so that it will accommodate the necessary range. For example if there are actually 20 names and corresponding data occupying 250 +/- rows on sheet 1 then you may change ...Sheet1!BN$2:BN$200... to read ...Sheet1!BN$2:BN$300... and ROW($3:$200) to read ROW($3:$300). Modifying the ranges up to ...$10000 or ...$20000 should work fine.
    Note: The ...Sheet1!BN$2:BN$200... to ...Sheet1!BN$2:BN$300... example should be extended to all parts of all formulas that reference ranges on sheet 1.
    It may be a temptation to simply make all range references to sheet 1, as well as all ROW function arguments, read 2:1048576, in my experience that increases the processing time unnecessarily (unless you have a very powerful computer).
    Let us know if you have any questions.
    If this should resolve the issues, please take a moment to mark the thread as 'Solved' using the thread tools drop down in the ribbon above your first post.
    I hope that you have a blessed day.

  7. #7
    Registered User
    Join Date
    05-29-2015
    Location
    Stoke-On-Trent, England
    MS-Off Ver
    2010
    Posts
    40

    Re: Sorting time card Data

    Hi

    Thank you for the quick response.

    I am having some issues with the formula populating correctly and I can't figure out why. I have attached a file with some examples so that you can see the problem.

    On results 2 tab I have high lighted where one of the issues occurs.

    If you have any questions please let me know

    Thank you in advance

    Dominic
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Sorting time card Data

    It appears to me that the issue is caused by the omission of the term "REST" in columns I and Q for employees 15, 16 and 38 (perhaps further down also) on the Export 2 sheet. I placed the term "REST", highlighted in red, as corresponds to its placement in other locations on the Export 2 sheet and the issue disappears.
    Let us know if you have any questions.

  9. #9
    Registered User
    Join Date
    05-29-2015
    Location
    Stoke-On-Trent, England
    MS-Off Ver
    2010
    Posts
    40

    Re: Sorting time card Data

    Thank you for that, I had been looking at the data for most of the day and thought that I may be missing something that was obvious.

    Thanks again

    D

+ 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. Replies: 4
    Last Post: 02-14-2018, 03:52 PM
  2. want to match time in out by employee id to cell from punch card data
    By spriggan in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 04-04-2016, 09:32 PM
  3. Budgeting out percentages of time from a time card calculation sheet
    By mhadaway in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-24-2015, 05:05 PM
  4. excel time card & time sheet
    By imranccri in forum Excel General
    Replies: 1
    Last Post: 01-14-2015, 06:04 AM
  5. Replies: 4
    Last Post: 12-09-2012, 03:48 PM
  6. [SOLVED] Converting time to hours in a time card
    By frankday in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-18-2012, 06:04 PM
  7. Replies: 7
    Last Post: 05-18-2009, 02:00 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