OzGrid

How to find the maximum date within date range

< Back to Search results

 Category: [Excel]  Demo Available 

How to find the maximum date within date range

 

Requirement:

 

The user has a range of:

42977.00
42976.00
42977.01
42976.01
42979.00
42976.02
42977.09

42977 represents 8/29/17
42977.07 is a little later in the day.

The user needs to find the highest instance of 42977, before it reaches 42978

 

Solution:

 

=MAX(IF(A1:A10<X1+1,A1:A10))

Where A1:A10 is the range of dates, and X1 holds the 8/29/17 date to check for.


* Array Formulas (sometimes referred to as "CSE" formulas) have to be confirmed by pressing Ctrl+Shift+Enter rather than just pressing Enter

 

Obtained from the OzGrid Help Forum.

Solution provided by NBVC.

 

See also: Index to Excel VBA Code and Index to Excel Freebies and Lesson 1 - Excel Fundamentals and Index to how to… providing a range of solutions and Index to new resources and reference sheets

 

See also:

How to sum from two tables based on From-To date criteria
How to drag every Nth column, with varying starting column by date
How to use a VBA code to change cells colours based on date in other cells
How to count non blanks 5 years from the last non blank date

 

Click here to visit our Free 24/7 Excel/VBA Help Forum where there are thousands of posts you can get information from, or you can join the Forum and post your own questions.

 

 


Gallery



stars (0 Reviews)