How to Compare If Date Is Before Another Date in Excel: 6 Quick Methods

Method 1 – Use a Formula to Compare If a Date Is Before Another Date

Steps:

  • Select a cell to write a formula. We selected cell (E5).
  • Apply the following formula-
=C5<=D5

Use Formula to Compare If Date Is Before Another Date

  • Press the Enter button, and you will get the result. It returned “True” as the “Submission Date” is less than the “Submission Deadline”. The result will be “False”.
  • Drag the “fill handle” down to fill the cells with the desired output.

  • We compared two dates to determine if one was before the other date or not.

Use Formula to Compare If Date Is Before Another Date


Method 2 – Utilize the IF Function to Compare If a Date Is Before Another Date

Steps:

  • Choose a cell (E5) to apply the formula.
  • Put the formula down-
=IF(C5<=D5,"On time","Late submission")

Where,

  • The IF function checks whether the condition is met and then returns a defined statement based on the given condition.

Utilize IF Function to Compare If Date Is Before Another Date

  • Click the Enter button and pull the “fill handle” down to get the desired output.
  • We compared two dates and got our output in the status column.


Method 3 – Insert Date in Formula to Compare If Date Is Before Another Date

Steps:

  • Choose a cell (D5) to apply the formula.
  • Write the formula down-
=C5<="15-05-22"

Insert Date in Formula to Compare If Date Is Before Another Date

  • Hit Enter and drag down the “fill handle”.
  • The dates are compared using a simple formula.

Insert Date in Formula to Compare If Date Is Before Another Date


Method 4 – Apply the DATEVALUE Function to Compare If the Date Is Before Another Date

You can also do the same task by applying the DATEVALUE function in Excel. The DATEVALUE function converts a date to a text string as a serial number.

We have a dataset with some dates, just like the following screenshot.

Steps:

  • Choose a cell (D5) and then put the following formula down-
=C5<=DATEVALUE("4/15/2022")

 Apply DATEVALUE Function to Compare If Date Is Before Another Date

  • Press Enter and drag down the “fill handle”.
  • We successfully compared if the date is before another date utilizing the DATEVALUE function.


Method 5 – Perform the TODAY Function to Compare If the Date Is Before Another Date

Steps:

  • Select a cell (D5) to apply the formula-
=C5<=TODAY()

Perform TODAY Function to Compare If Date Is Before Another Date

  • Cick the Enter button and drag down the “Fill Handle” to fill all the cells.
  • We compared the date from the dataset with our current today’s date without any hesitation. As all the dates from the list are before today’s date thus the output is “True” for all the cells.

Perform TODAY Function to Compare If Date Is Before Another Date


Method 6 – Combine IF and TODAY Functions to Compare If Date Is Before Another Date

Steps:

  • Choose a cell (D5) and apply the following formula down-
=IF(C5<=TODAY(),"Yes","No")

Combine IF and TODAY Functions to Compare If Date Is Before Another Date

  • Hit the Enter button.
  • Drag down the “fill handle” to get the final output.
  • We reached the destination by comparing the date if it was before another date in Excel.


Things to Remember

  • In method 3, after applying the formula, sometimes a “#VALUE!” error may occur. To avoid errors, remember to use quotation marks (“”)at the start and end of the date.

Download Practice Workbook

Download this practice workbook to exercise while you are reading this article.


<< Go Back to Dates | Compare | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Wasim Akram
Wasim Akram

Wasim Akram holds a BSc degree in Industrial and Production Engineering from Ahsanullah University of Science and Technology. Over the past 2 years, he has been actively contributing to the ExcelDemy project, where he has authored more than 150 articles. Now, he is working as an Excel VBA and Content Developer. He likes learning new things about Microsoft Office, especially Excel VBA, Power Query, Data Analysis, and Excel Statistics. He is also very interested in machine learning and... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo