logo
search
Formula Errors

How to Create an Excel Formula to Return Yes or No When Cells Are Filled

Maira MehtabMaira Mehtab Sep 22, 2026 869 views

Question details

The user needs an Excel formula that checks if three nonconsecutive cells contain dates, returning a green 'Yes' if all are filled, and 'No' otherwise.

Product
Excel
Device & OS
not provided
Scenario
Checking multiple nonconsecutive date cells for completeness using a logical formula.
Observed behavior
Returns 'Yes' in green only when all three specified cells are filled with dates; returns 'No' if any required cell is empty.
Before you start

Identify the exact cell references you need to check (e.g., B2, D2, F2) and ensure the cells you want to check for dates do not contain hidden spaces.

Solution 1Recommended

Use IF and OR Functions with Conditional Formatting

This solution combines logical formulas to verify if any required cells are blank and applies conditional formatting to highlight the 'Yes' result in green.

By nesting the OR function inside the IF function, you can check multiple cells simultaneously. If any one of the specified cells is empty, the formula triggers the 'No' response. If all are filled, it returns 'Yes'.

1
Select the destination cell

Click on the cell where you want the Yes/No result to appear.

2
Enter the logical formula

Type the formula =IF(OR(B2="",D2="",F2=""),"No","Yes") into the formula bar, replacing B2, D2, and F2 with your specific cell references, then press Enter.

3
Open Conditional Formatting

Keep the result cell selected, go to the 'Home' tab on the ribbon, and click 'Conditional Formatting'.

4
Set the highlight rule

Choose 'Highlight Cells Rules' > 'Equal To', type 'Yes' in the dialog box, and select 'Custom Format' from the drop-down menu to change the font or fill color to green.

Formula Breakdown: The OR function checks if any of the required cells are empty (""). If true, the IF function outputs 'No', ensuring 'Yes' only appears when every required cell has data.
Advanced Spreadsheet Management

Easily Apply Logical Formulas and Formatting in WPS Spreadsheet

WPS Office provides robust support for logical formulas like IF, AND, and OR, along with an intuitive conditional formatting interface to help you track data seamlessly and beautifully.

  1. 1. Open your workbook: Launch WPS Spreadsheet and open the file containing your date cells.
  2. 2. Input the formula: Select your target cell and input the =IF() logical formula.
  3. 3. Apply Conditional Formatting: Navigate to the Home tab and select Conditional Formatting to easily apply the green highlight rule for the 'Yes' outcome.
Fully compatible with Microsoft Excel formulas, functions, and formatting rules.Intuitive Conditional Formatting interface for quick data highlighting.Lightweight software that runs smoothly on Windows, Mac, and Linux.Free to use with a familiar, easy-to-navigate interface.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my formula return 'Yes' when a cell is actually empty?

Check your logical operators and cell references. If you are using the AND function, ensure you are checking that cells are NOT empty (<>""). If using the OR function, ensure you are checking if cells ARE empty (=""). Also, ensure the seemingly blank cell doesn't contain a hidden space character.

Can I check more than three cells using this formula?

Yes, you can add as many cell references as needed inside the OR or AND functions, separated by commas (for example: OR(B2="",D2="",F2="",H2="")).

How do I format the 'No' result in red automatically?

Select your formula cell, go to Conditional Formatting > Highlight Cells Rules > Equal To, enter 'No' in the prompt, and choose a red fill or red text color format.