+ Reply to Thread
Results 1 to 9 of 9

Get 1 1st Item by the earliest date and time

  1. #1
    Registered User
    Join Date
    04-22-2023
    Location
    jakarta
    MS-Off Ver
    google spreadsheet
    Posts
    11

    Get 1 1st Item by the earliest date and time

    Hi,
    i have an issue that hope you guys can help me to solve it.
    I have 2 sheets table which is Data 1 and Data 2, both sheet data include date, name and amount
    The result that i want is lookup the name and get the amount with the earliest date with time

    DATA 1
    Date Name Amount
    1 Sep 2023 20:39:31 Johny 2,000
    1 Sep 2023 22:59:22 Maydeline 2,000
    1 Sep 2023 23:20:05 Celine 3,000
    2 Sep 2023 18:59:02 Johny 2,000
    2 Sep 2023 5:59:31 Celine 2500


    DATA 2
    Date Name Amount
    1 Sep 2023 10:59:31 Johny 1,000
    2 Sep 2023 20:22:22 Andy 2,000
    2 Sep 2023 23:19:05 Celine 3,000

    Result
    Name 1st Value
    Johny 1000
    Maydeline 2,000
    Celine 3,000
    Andy 2000





    Thank You

  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. 2502 (Windows 11 Home 24H2 64-bit)
    Posts
    89,500

    Re: Get 1 1st Item by the earliest date and time

    Which version of Excel do you have? Please update your forum profile.

    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. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    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
    04-22-2023
    Location
    jakarta
    MS-Off Ver
    google spreadsheet
    Posts
    11

    Re: Get 1 1st Item by the earliest date and time

    Hi thank you for replying my thread,
    Here is the Screenshot of my sheet Hope you can understand it.

    FYI i am using Spreadsheet


    Attachment 844026

    please inserts " https: " before //
    //docs.google.com/spreadsheets/d/1XnWcqK982BjkH-vQpAwQVXIB3Px2kYLaa6pt7V2UHRw/edit#gid=1012361527
    Last edited by slotyuk; 09-27-2023 at 11:40 AM.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Get 1 1st Item by the earliest date and time

    1. You were told that a screenshot is USELESS. We can not edit it.

    2. You have NOT told us which Excel product you are using. "Spreadsheet" is meaningless.

    3. I have assumed that you have O365. This will NOT work with earlier products. But we don't know... as you never told us...

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




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  5. #5
    Registered User
    Join Date
    04-22-2023
    Location
    jakarta
    MS-Off Ver
    google spreadsheet
    Posts
    11

    Re: Get 1 1st Item by the earliest date and time

    thank you for replying, sorry about my issue, im new on this
    The Version i use is Google Spreadsheet
    im trying to input the URL but unable to do it.

    your formula its worked in excel, trying applied it to google spreadsheet the take function was unble using on google

    please inserts " https: " before //
    //docs.google.com/spreadsheets/d/1XnWcqK982BjkH-vQpAwQVXIB3Px2kYLaa6pt7V2UHRw/edit#gid=1012361527
    Last edited by slotyuk; 09-27-2023 at 11:53 AM.

  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. 2502 (Windows 11 Home 24H2 64-bit)
    Posts
    89,500

    Re: Get 1 1st Item by the earliest date and time

    Change your forum profile to GoogleSheets. I am moving this to the correct sub-forum.

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Get 1 1st Item by the earliest date and time

    It won't work in GS. I don't use GS, so I'm out. others will be able to help.

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    18,600

    Re: Get 1 1st Item by the earliest date and time

    Looking through the list of google sheet functions, it appears that all of those used in Glenn's formula would work with the exception of TAKE.
    This proposal uses older functions and adds columns to the Data 1 and Data 2 sheets.
    1. The formula in column D of both sheets is similar to: =MIN(MINIFS(A$2:A$6,B$2:B$6,B2),IF(COUNTIFS('Data 2'!B$2:B$4,B2),MINIFS('Data 2'!A$2:A$4,'Data 2'!B$2:B$4,B2),99^99))=A2
    2. The formula in column E of both sheets is similar to: =IF(D2=FALSE,0,COUNTIFS(D$2:D2,TRUE))
    3. The formula on the Result sheet is: =IFERROR(IFERROR(INDEX('Data 1'!B$2:B$6,MATCH(ROWS(A$2:A2),'Data 1'!$E$2:$E$6,0)),INDEX('Data 2'!B$2:B$4,MATCH(ROWS(A$2:A2),'Data 2'!$E$2:$E$4,0))),"")
    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.

  9. #9
    Valued Forum Contributor janmorris's Avatar
    Join Date
    07-24-2021
    Location
    Japan
    MS-Off Ver
    Google Sheets (& Mac 2021)
    Posts
    1,141

    Re: Get 1 1st Item by the earliest date and time

    Selamat malam slotyuk,

    Here is a solution using the data you specified in your opening enquiry, as arranged in the sample file provided by @JeteMc (which has been converted to Google Sheets file).

    You can return the first row for each distinct name in column B with this formula:

    Please Login or Register  to view this content.
    As a gesture off appreciation, you can click * Add Reputation at the foot of any of the posts of members who helped you reach a solution.

    And finally, was your problem solved? if so, please click Thread Tools above the first post of your enquiry, then select [Solved]

+ 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. Earliest time on a date
    By puffin81 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-02-2023, 12:59 PM
  2. [SOLVED] Find Earliest Time IF Date is Today
    By Necroscope in forum Excel General
    Replies: 14
    Last Post: 03-14-2021, 06:41 AM
  3. Find which cell in each row has the earliest date/time
    By gcotterl in forum Excel General
    Replies: 12
    Last Post: 06-30-2017, 01:39 PM
  4. Find the earliest date&time for a value from different column
    By Neyme in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-08-2015, 10:10 PM
  5. Replies: 3
    Last Post: 08-31-2014, 06:39 AM
  6. Finding earliest date/time
    By Atlanticja in forum Excel General
    Replies: 3
    Last Post: 10-10-2012, 06:37 AM
  7. Identifying earliest expiration date/time
    By Arand in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-09-2010, 08:04 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