Skip to content
xlsoffice. All Rights Reserved
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Lookup and Reference Examples

  • How to calculate two-way lookup VLOOKUP in Excel Table
  • VLOOKUP function: Description, Usage, Syntax, Examples and Explanation
  • Count rows that contain specific values in Excel
  • Two-way lookup with VLOOKUP in Excel
  • How to use Excel INDIRECT Function

Data Analysis Examples

  • How to Use Solver Tool in Excel
  • Move chart to a separate worksheet in Excel
  • Example of COUNTIFS with variable table column in Excel
  • Everything about Charts in Excel
  • Conditional Formatting Color Scales Examples in Excel

Data Validation Examples

  • Excel Data validation allow weekday only
  • Excel Data validation don’t exceed total
  • Excel Data validation whole percentage only
  • Excel Data validation must contain specific text
  • Excel Data validation must not contain

How to calculate next scheduled event in Excel

by

To get the next scheduled event from a list of events with dates, you can use an array formula based on the MIN and TODAY functions to find the next date, and INDEX and MATCH  to display the event on that date.

Formula

{=MIN(IF((range>=TODAY()),range))}

Note: this is an array formula and must be entered with Control + Shift + Enter.

Explanation

In the example shown, the formula in G6 is:

{=MIN(IF((date>=TODAY()),date))}

Where “date” is the named range D5:D14.

How this formula works

The first part of the solution uses the MIN and TODAY functions to find the “next date” based on the date today. This is done by filtering the dates through the IF function:

IF((date>=TODAY()),date)

The logical test generates an array of TRUE / FALSE values, where TRUE corresponds to dates greater than or equal to today:

{FALSE;FALSE;FALSE;TRUE;TRUE;TRUE;TRUE;TRUE;TRUE;TRUE}

When a result is TRUE, the date is passed into array returned by IF. When a result is FALSE, the date is replaced by the boolean FALSE. The IF function returns the following array to MIN:

{FALSE;FALSE;FALSE;43371;43385;43399;43413;43427;43441;43455}

The MIN function then ignores the FALSE values, and returns the smallest date value (43371), which is the date Sept. 28, 2018 in Excel’s date system.

Worked Example:   Not Equal To '<>' operator in Excel

Getting the movie name

To display the movie associated with the “next date””, we use INDEX and MATCH:

=INDEX(movie,MATCH(G6,date,0))

Inside INDEX, MATCH finds the position of the date in G6 in the list of dates. This position, 4 in the example, is returned to INDEX as a row number:

=INDEX(movie,4)

and INDEX returns the movie at that position, “The Dark Knight”.

Worked Example:   Position of first partial match in Excel

All in one formula

To return the next Movie in a single formula, you can use this array formula:

{=INDEX(movie,MATCH(MIN(IF((date>=TODAY()),date)),date,0))}

With MINIFS

If you have a newer version of Excel, you can use the MINIFS function instead of the array formula in G6:

=MINIFS(date,date,">="&TODAY())

MINIFS was introduced in Excel 2016 via Office 365.

Handling errors

The formula on this page will work even when events aren’t sorted by date. However, if there are no upcoming dates, the MIN function will return zero instead of an error. This will display as the date “0-Jan-00” in G6, and the INDEX and MATCH formula will throw an #N/A error, since there is no zero-th row to get a value from. To trap this error, you can replace MIN with the SMALL function, then wrap the whole formula in IFERROR like this:

={IFERROR(SMALL(IF((date>=TODAY()),date),1),"None found")}

Unlike MIN, the SMALL function will throw an error when a value isn’t found, so IFERROR can be used to manage the error.

Worked Example:   How to retrieve first match between two ranges in Excel

Post navigation

Previous Post:

How to calculate most recent day of week in Excel

Next Post:

How to calculate next day of week in Excel

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others
  • Convert text to numbers using VALUE function in Excel
  • How to split text string at specific character in Excel
  • Remove line breaks in a cell in Excel
  • How to strip non-numeric characters in Excel
  • FIXED function: Description, Usage, Syntax, Examples and Explanation
  • Get project midpoint in Excel
  • Convert text timestamp into time in Excel
  • How to get same date next year or previous year in Excel
  • Count dates in current month in Excel
  • Calculate series of dates by workdays in Excel
  • PMT function: Description, Usage, Syntax, Examples and Explanation
  • Example of Future value of annuity in Excel
  • COUPPCD function: Description, Usage, Syntax, Examples and Explanation
  • NPV function: Description, Usage, Syntax, Examples and Explanation
  • ODDFYIELD function: Description, Usage, Syntax, Examples and Explanation
© 2022 xlsoffice . All Right Reserved. | Teal Smiles