# Excel Formula If Date Is Less Than Today (4 Examples)

Letâ€™s say we have a Student-wise Submission Dates list of a certain institution. This dataset contains the First Names, Last Names, and Submission Dates in columns B, C, and D, respectively. Weâ€™ll use 4 different approaches to check if the dates are before todayâ€™s date.

### Method 1 – Using an Excel Formula to Determine If a Date Is Less Than Today

Steps:

• Create a new column in Column E. This new column sits just beside the Submission Date column.
• Give it a name. In this case, we named it Less than today.

• Select cell E5.
• Insert the following formula.
`=D5<TODAY()`

Here, D5 represents the cell reference of the Submission Date of the first student Harry Albert. And the TODAY function returns todayâ€™s date only. Weâ€™re checking whether the date in cell D5 is lower than the date of today or not.

• Press Enter.

• Bring the cursor to the bottom right corner of cell E5. Itâ€™ll look like a plus (+) sign. This the Fill Handle tool.
• Double-click on it.

• This copies the formula to the lower cells.

### Method 2 – Utilizing the IF Function to Determine If a Date Is Less Than Today in Excel

Steps:

• Select cell E5.
• Paste the following formula into the Formula Bar:
`=IF(D5<TODAY(),"Submitted","Not Submitted")`

Here, the IF function performs a logical test which is the value in cell D5 is less than todayâ€™s date. If the condition is true, then itâ€™ll show Submitted in cell E5. Otherwise, it shows Not Submitted in the cell.

• Press Enter.

### Method 3 – Applying Conditional Formatting

Steps:

• Select cells in the D5:D14 range.
• Go to the Home tab.
• Click on the Conditional Formatting drop-down on the Styles group.
• Select New Rule from the list.

• The New Formatting Rule dialog box opens.
• Choose Use a formula to determine which cells to format under the Select a Rule Type section.
• Put =D5<TODAY( ) in the Format values where this formula is true box.
• Select the Format button.

• The Format Cells wizard opens.
• Move to the Fill tab.
• Choose the Light Green color from the available options.
• Click OK.

• This returns to the New Formatting Rule dialog box.
• Click OK again.

• The dates lower than today get highlighted with our preferred color.

### Method 4 – Using VBA Code to Determine If a Date Is Less Than Today

Steps:

• Construct a new column named Status like before.

• Go to the Developer tab.
• Select Visual Basic on the Code group.
• Alternatively, press Alt + F11.

• The Microsoft Visual Basic for Applications window opens.
• Go to the Insert tab and select Module from the options.

• This opens the Code Module.
• Copy the following code in the Module.
``````Sub tst_today()
Dim x As Integer
For x = 5 To 14
If Cells(x, 4).Value < Date Then
Cells(x, 5).Value = "Submitted"
Else
Cells(x, 5).Value = "Not Submitted"
End If
Next x
End Sub``````

• Select the Run icon or press F5 on the keyboard.

• The Status column gets filled automatically with the correct result.

## How to Check Whether the Date Is Less than Today and Within 30 Days

Steps:

• Select cells in the D5:D14 range.
• Click on the Conditional Formatting drop-down on the Styles group.
• Select New Rule from the list.

• The New Formatting Rule dialog box opens.
• Choose the Format only cells that contain section.
• Select between in the secondÂ box of Format only cells with.
• Insert =TODAY( )-1 in the third box and =TODAY( )-30 in the fourth box.
• Select the Format button.

• Choose a Yellow Fill color in the Format Cells window and click OK.

• Click OK again.

• This highlights the cells containing dates lower than todayâ€™s date and within 30 days from today.

## Practice Section

For practice, we have provided a Practice section like below in each sheet on the right side.

<< Go Back to Dates | Compare | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Shahriar Abrar Rafid

Shahriar Abrar Rafid, BSc, Naval Architecture and Marine Engineering, Bangladesh University of Engineering and Technology, Bangladesh, has worked with the ExcelDemy project for more than 1 year. He has written over 100+ articles for ExcelDemy. He is a professional visual content developer adept at crafting scripts, meticulously editing Excel files, and delivering insightful video tutorials for YouTube channels. His work and learning interests vary from Microsoft Office Suites and Excel to Data Analysis, VBA, and Video recording and... Read Full Bio

We will be happy to hear your thoughts

Advanced Excel Exercises with Solutions PDF