+ Reply to Thread
Results 1 to 3 of 3

Need to find the date between two other dates with one condition

  1. #1
    Registered User
    Join Date
    07-16-2017
    Location
    Dammam
    MS-Off Ver
    Office 365
    Posts
    10

    Need to find the date between two other dates with one condition

    Hello Everyone,

    I need to find the time in column C which is a time between B and D. the options are on F and G.
    The Vehicle should be the same with column A.

    I'm using this formula:

    {=IF(SUMPRODUCT(--($F$2:$F$756=$A2),--($G$2:$G$756>=$B2),--($G$2:$G$756<=$D2),($G$2:$G$756))>0,SUMPRODUCT(--($F$2:$F$756=$A2),--($G$2:$G$756>=$B2),--($G$2:$G$756<=$D2),($G$2:$G$756)),"")}

    The problem is that if there are multiple results, the dates are being added. I'm getting years 2135, 2253 and 2371 on this file.\

    I only need the first result and not add the dates that qualify with the formula.

    Please refer to the attached file.

    Thank you.
    Attached Files Attached Files

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Need to find the date between two other dates with one condition

    =IFERROR(INDEX($G$1:$G$756,AGGREGATE(15,6,ROW($G$2:$G$756)/($F$2:$F$756=$A2)/($G$2:$G$756>=$B2)/($G$2:$G$756<=$D2),1)),"") not array

  3. #3
    Registered User
    Join Date
    07-16-2017
    Location
    Dammam
    MS-Off Ver
    Office 365
    Posts
    10

    Re: Need to find the date between two other dates with one condition

    Quote Originally Posted by tim201110 View Post
    =IFERROR(INDEX($G$1:$G$756,AGGREGATE(15,6,ROW($G$2:$G$756)/($F$2:$F$756=$A2)/($G$2:$G$756>=$B2)/($G$2:$G$756<=$D2),1)),"") not array
    This Worked. Thank you.

+ 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. find date, copy refering to the heders and one condition(in last row)
    By grzecheem in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-28-2015, 08:16 AM
  2. [SOLVED] Find the date closer to another with a condition
    By tsakta13ole in forum Excel General
    Replies: 11
    Last Post: 05-22-2015, 08:29 AM
  3. Replies: 5
    Last Post: 01-16-2014, 11:51 AM
  4. If condition for dates in range result depends upon changes of date
    By breadwinner in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-11-2013, 08:26 AM
  5. [SOLVED] Find Last Entry (Date) in a List satisfying a Condition
    By rau in forum Excel General
    Replies: 5
    Last Post: 09-03-2012, 02:10 AM
  6. Replies: 8
    Last Post: 02-27-2009, 06:06 PM
  7. [SOLVED] how do I put today's date and other dates in macro condition?
    By lpdarspe in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-04-2006, 08:30 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