Go Back

Excel Data Validation Using the YEAR Function

Read time: 25 minutes

Figure 1. Excel Data Validation Using the YEAR Function.

Let’s assume that we have to generate a DATA VALIDATION using Excel YEAR Function to permit entries of dates occurring within a specific year, we must utilize a custom formula syntax based on the YEAR Function in Excel.

Formula Syntax

=YEAR(date)

This formula syntax returns as a result TRUE or FALSE. Which simply means that formula will return FALSE if all conditions in the formula are FALSE, and TRUE when all conditions in the formula are TRUE.

How to use Excel DATA VALIDATION Using the YEAR Function.

Let’s say we have to create a data entry validation for dates occurring before the year 2019 in Excel,we are going to get this done by following 3 simple steps;

  • In our worksheet example below, we have a collection of dates scheduled for interviews;

Figure 2. Excel Data Validation Using the YEAR Function.

Our purpose here is to flag any date entries that occur before the year 2019.

  • The DATA VALIDATION formula that we will enter into cell C2 of our worksheet example is as follows;
    =YEAR(B2)=2019

Figure 3. Excel Data Validation Using the YEAR Function.

Excel returned the result of the Data Validation as TRUE because the date falls within the year 2019 (assume that today is 27th of January 2019).

  • Copy and paste the modified version of the Data Validation formula in cell C2 above, down into the other cells in the RESULT column for the next results.

Figure 4. Excel Data Validation Using the YEAR Function.

We can utilize the custom data validation formula based on the YEAR function to permit a user to enter only dates in a specific year.

Anytime a user adds or changes a cell value, data validation rules are triggered.

Figure 5. Final Result.

Instant Connection to an Expert through our Excelchat Service:

Our live Excelchat Service is here for you. We have Excel Experts available 24/7 to answer any Excel questions you may have. Guaranteed connection within 30 seconds and a customized solution for you within 20 minutes.

Did this post not answer your question? Get a solution from connecting with the expert.

Another blog reader asked this question today on Excelchat:
Here are some problems that our users have asked and received explanations on

Trying to pull data from ONLY a certain date into the table. Have it sorted now but it picks all dates. thanks in advance,
Solved by B. Q. in 12 mins
I have created a worksheet but need to allow people to only print certain groups of cells based on a checkbox selection.
Solved by I. H. in 24 mins
One column has lease expiry dates, I only want to include data from leases that are greater than a certain time period in a pivot table, can I do that?
Solved by O. A. in 29 mins

Leave a Comment

avatar