+ Reply to Thread
Results 1 to 15 of 15

Find Last value on Multiple conditions

  1. #1
    Registered User
    Join Date
    01-17-2024
    Location
    Australia
    MS-Off Ver
    MS365 Version 2406
    Posts
    7

    Find Last value on Multiple conditions

    I need to find the last log OUT time on a certain date for a certain person. This is dues to multiple sign-outs on same day at different times and i want to find the last time. My current formula always returns the first time which is great for the start time but not so good for the end time.

    Start times and Finish times are on separate sheets

    This is my Formula for the start time
    =IFERROR(INDEX(tbl_in[[#All],[Timestamp]],MATCH(1,(tbl_in[/B][[#All],[DATE]]='Times Check'!$AL$1)*(tbl_in[[#All],[1st Initial/Last Name]]='Times Check'!$A3),0)),"")

    This is my formula for finish time
    =IFERROR(INDEX(tble_out[[#All],[Timestamp]],MATCH(1,(tble_out[[#All],[DATE]]='Times Check'!$AL$1)*(tble_out[[#All],[1st Initial/Last Name]]='Times Check'!$A3),0)),"")

    Where
    AL = DATE
    A3 = persons name.


    So, i am matching the date and the person's name at present but as above it always returns the first value where i need it to return the last value on that day for that person.


    Snap of the OUT spread sheet.
    Screenshot_1.jpg


    Any help appreciated
    Attached Files Attached Files
    Last edited by Wazza450; 07-23-2024 at 12:50 AM. Reason: added file example

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,019

    Re: Find Last value on Multiple conditions

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. The sample layout accurately matches that of your real data. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.

    Administrative Note:

    Is your forum profile showing the oldest Excel PRODUCT that you need this to work for?

    Members will tailor the solutions they offer to the Office PRODUCT (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your product is for Mac, please also state this.

    The three most recent Excel products are Excel 2019, Excel 2021 and MS365 - if you are using MS365, please give this name along with the version number in your profile (e.g. MS365 Version 2306). This is in the About Excel section further down the Account page.

    Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    01-17-2024
    Location
    Australia
    MS-Off Ver
    MS365 Version 2406
    Posts
    7

    Re: Find Last value on Multiple conditions

    OK. Thank you. Thats good information to know.
    I am using MS365 Version 2406. I will try and do up a sample file next week and upload.
    The one I have, has many sheets and moving parts with sensitive info.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,019

    Re: Find Last value on Multiple conditions

    Thanks. Please update your forum profile as requested above - it currently says '10'.

  5. #5
    Registered User
    Join Date
    01-17-2024
    Location
    Australia
    MS-Off Ver
    MS365 Version 2406
    Posts
    7

    Re: Find Last value on Multiple conditions

    Added file to post.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,019

    Re: Find Last value on Multiple conditions

    In V3 copied down:

    =TAKE(SORT(FILTER(tble_out[Timestamp],(tble_out[1st Initial/Last Name]=$A3)*(tble_out[DATE]=$U$1)),,-1),1)
    Attached Files Attached Files
    Last edited by AliGW; 07-23-2024 at 01:11 AM. Reason: Workbook added.

  7. #7
    Registered User
    Join Date
    01-17-2024
    Location
    Australia
    MS-Off Ver
    MS365 Version 2406
    Posts
    7

    Re: Find Last value on Multiple conditions

    Thanks, AliGW - So grateful for your effort to look at this and reply. I have just implemented your formula into my main spreadsheet, and it is working a treat. I have not used the TAKE function before, so I am busily checking it out. Interesting that google search for my issue did not even come close to your answer. Ha Google does not know everything and experience counts. Thanks again.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,019

    Re: Find Last value on Multiple conditions

    You're welcome.

    This is a useful resource for new 365 functions: https://bettersolutions.com/excel/fu...-functions.htm

  9. #9
    Registered User
    Join Date
    01-17-2024
    Location
    Australia
    MS-Off Ver
    MS365 Version 2406
    Posts
    7

    Re: Find Last value on Multiple conditions

    Thanks, I will have a look through and bookmark that link for future reference.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,019

    Re: Find Last value on Multiple conditions

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  11. #11
    Registered User
    Join Date
    01-17-2024
    Location
    Australia
    MS-Off Ver
    MS365 Version 2406
    Posts
    7

    Re: Find Last value on Multiple conditions

    Hi Ali, I get this message when i try to add reputation. I believe I did add it the other day but not 100% sure. Attachment 875367

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,019

    Re: Find Last value on Multiple conditions

    The attachment doesn't work, but I guess it's about spreading the love, which you'll need to do if you'd like to rep me again. Thanks for the thought.

  13. #13
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,479

    Re: Find Last value on Multiple conditions

    Quote Originally Posted by Wazza450 View Post
    Hi Ali, I get this message when i try to add reputation. I believe I did add it the other day but not 100% sure. Attachment 875367
    Given that you only have six posts and they are all in this thread, I’m guessing you gave +rep to Ali's solution in post #7. You can't give more rep to the person until you have given rep to someone else. It's to avoid abuse of the system.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  14. #14
    Registered User
    Join Date
    01-17-2024
    Location
    Australia
    MS-Off Ver
    MS365 Version 2406
    Posts
    7

    Re: Find Last value on Multiple conditions

    Thank you for clarifying. Apologies if i confused anyone. Yes i am only new to the group. It does look like i left AliGW a rep and hence error message occurred when i went to do it again. Exactly as you stated. Thanks again.

  15. #15
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,479

    Re: Find Last value on Multiple conditions

    You're welcome. Thanks for the rep.

+ 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. Formula to find multiple conditions
    By Serpan75 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-22-2020, 09:13 AM
  2. Multiple search conditions to find value
    By MARGI123 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 12-04-2019, 11:05 PM
  3. [SOLVED] Need to find average with multiple conditions
    By Bhavya2312 in forum Excel General
    Replies: 7
    Last Post: 09-07-2018, 04:18 AM
  4. [SOLVED] Find sum with multiple conditions of 'top n values of a table'.
    By Sarangsood in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 03-14-2016, 09:12 AM
  5. Find a value using multiple conditions
    By tony7659 in forum Excel General
    Replies: 4
    Last Post: 09-01-2011, 03:19 PM
  6. Find and Replace with multiple conditions problem.
    By Benisato in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 03-12-2010, 06:06 AM
  7. vlookup with conditions to find multiple entries
    By excelnerd1 in forum Excel Formulas & Functions
    Replies: 24
    Last Post: 02-05-2009, 05:56 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