+ Reply to Thread
Results 1 to 5 of 5

Display latest date from many in datasheet

  1. #1
    Forum Contributor
    Join Date
    06-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2016
    Posts
    144

    Display latest date from many in datasheet

    I've been developing my database with the assumption that this could work, but I don't actually know for certain so I thought before I continue I'll make sure it's still possible.

    I've currently got a spreadsheet, with employee names on the left column, and varying qualifications on all other columns. This spreadsheet displays expiry dates for these qualifications like so:

    Name First Aid Fire Safety Vehicle Checks Driver Assessment
    Joe 11/01/15 21/06/15 07/09/17 08/08/19
    Steven 11/01/15 25/06/18 16/09/15 30/04/14
    Daniel 05/05/13 12/12/14 09/10/19 15/01/14

    The problem with this method of saving information is if someone does multiple First Aid courses (or fire safety etc.) the latest one with the latest expiry date is show, and there's no record of that employee doing a course more than once.

    So that's why I'm moving to access, with normalised data:

    Name Date Exp Qualification
    Joe 21/06/15 Fire Safety
    Steven 16/09/15 Vehicle Checks
    Daniel 05/05/13 First Aid
    etc etc etc

    This will now show all the (many) courses they've done and repeated.
    But to stop repeated data in different tables. I need to use the normalised table to present a table like the first one, displaying only the latest date.

    Is this possible?

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,177

    Re: Display latest date from many in datasheet

    You need to tables, tEmps, and tEmpTraining.
    the tEmpTraining would track each emps training dates as 1 to many.

    Name Date Exp Qualification
    Joe 21/06/15 Fire Safety
    Steven 16/09/15 Vehicle Checks
    Daniel 5/5/2013 First Aid
    Joe 20/06/14 Fire Safety
    Steven 11/9/2014 Vehicle Checks

  3. #3
    Forum Contributor
    Join Date
    06-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2016
    Posts
    144

    Re: Display latest date from many in datasheet

    Yes I know that. What I'm trying to do is from my many table, is it possible to create a datasheet that looks like my first (unnormalised) table I've shown; displaying the latest date for each qualification

  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,884

    Re: Display latest date from many in datasheet

    If you have your data in an Excel Spreadsheet, then use this code to normalize the data

    Please Login or Register  to view this content.

    and then you can import into Access for analysis.
    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
    Forum Contributor
    Join Date
    06-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2016
    Posts
    144

    Re: Display latest date from many in datasheet

    That's not the problem that I am facing at the moment. Although huge thanks for that code as I've still got a lot more data to normalise.

    The problem I have is, from my normalised data (which I already have, tblEmpTraining), I need access to be able to build a datasheet that looks like my un-normalised table I showed in my original post.

    Thus will be able to show everyones name per row and the date they did their each qualification per column.

    N.B I don't need access to automatically add the columns, as I will have pre-made the columns, I just need access to show the latest date the employee did for that course


    You might suggest I do a pivot table and change the values of dates from sum to max. But the problem I face with that is I need to build several different datasheets from tblEmpTraining, and these datasheets are depended on another field from tblEmpTraining which is a check box label 'Is_course_CPC_approved'.

    So one datasheet will show all the dates (like what a pivot table will do), but another datasheet will only show the dates that have Is_course_CPC_approved marked as yes.

    I hope that explains everything.

+ 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. VBA for display Various Datasheet data in Masterdatasheet when we choose datasheet name
    By santosh226001 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-08-2014, 10:21 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