Excel Formula to Check Client Activity During a Specific Year
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).

- 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.
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).
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).
Click on the cell where you want the active status result to appear (for example, cell E2).
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))))
Press Enter. The cell will display TRUE if the client was active during 2020, or FALSE if they were not.
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.

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. Open your dataset: Launch WPS Spreadsheet and open the file containing your client admission and discharge dates.
- 2. Enter the formula: Select the target cell and input the combined OR/AND date logic formula.
- 3. Batch apply: Use the fill handle to drag and drop the formula across your entire client database instantly.

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'.




