Function Problems

Excel Formula to Check Client Activity During a Specific Year

John WilsonJohn Wilson Oct 28, 2026 870 views

Question details

The user needs an Excel formula to evaluate admission and discharge dates to determine whether a client was actively participating in a program during a specific year (e.g., 2020).

How to Use an Excel Formula to Check Client Activity During a Specific Year
Product
Excel
Device & OS
not provided
Scenario
Tracking program participation over a designated timeframe where a blank discharge date indicates the client is still actively enrolled.
Observed behavior
Returning a TRUE or FALSE value based on whether the date range overlaps with the target year.
Before you start

Ensure your admission and discharge data are formatted as valid 'Date' cells in Excel, and identify which column holds the admission date (e.g., Column B) and the discharge date (e.g., Column C).

Solution 1Recommended

Use a Combined OR and AND Logic Formula

This solution uses Excel's logical functions to verify if the admission happened in the target year or if the client was admitted previously but remained active into the target year.

By combining the OR, AND, YEAR, and DATE functions, you can account for various scenarios: clients who joined during the target year, clients who joined prior but left during the target year, and clients who joined prior but have not yet left (blank discharge date).

1
Select the target cell

Click on the cell where you want the active status result to appear (for example, cell E2).

2
Input the logical formula

Assuming B2 contains the Admission Date and C2 contains the Discharge Date, type the following formula: =OR(YEAR(B2)=2020,AND(B2<>"",YEAR(B2)<2020,OR(C2="",C2>DATE(2020,1,1))))

3
Apply the formula

Press Enter. The cell will display TRUE if the client was active during 2020, or FALSE if they were not.

4
Fill the formula down the column

Hover over the bottom-right corner of cell E2 until the cursor turns into a cross icon, then click and drag down to apply the formula to the rest of your client list.

Use a Combined OR and AND Logic Formula
Customizing the Year: If you need to check for a different year, simply replace all instances of '2020' in the formula with your desired target year.
Manage Client Data Effectively

Easily Track Client Activity Dates with WPS Spreadsheet

WPS Spreadsheet offers powerful date functions, logic formulas, and a user-friendly interface to help you effortlessly manage and analyze client program records.

  1. 1. Open your dataset: Launch WPS Spreadsheet and open the file containing your client admission and discharge dates.
  2. 2. Enter the formula: Select the target cell and input the combined OR/AND date logic formula.
  3. 3. Batch apply: Use the fill handle to drag and drop the formula across your entire client database instantly.
Fully compatible with Microsoft Excel formulas and .xlsx file formatsAdvanced date and logical functions for complex tracking requirementsLightweight, fast, and completely free to use for daily data management
QA img-9

Frequently Asked Questions

How can I make the formula return 'Active' or 'Inactive' instead of TRUE/FALSE?

You can wrap the logical formula inside an IF function. For example: =IF(OR(YEAR(B2)=2020,AND(B2<>"",YEAR(B2)<2020,OR(C2="",C2>DATE(2020,1,1)))), "Active", "Inactive").

What if my blank discharge cells contain the word 'Current' instead of being empty?

If your active clients are marked with text like 'Current', modify the discharge check part of the formula from C2="" to C2="Current".

Why is my formula returning an error (#VALUE!)?

This usually happens if your admission or discharge dates are formatted as plain text rather than actual dates. Select your date columns, right-click, choose 'Format Cells', and ensure they are set to 'Date'.