Function Problems

Excel Formula to Return Y If Either Cell Contains Y

Bushra ParveenBushra Parveen Dec 2, 2026 868 views

Question details

Return Y in E41 if either C54 or C55 is Y, and return N when both cells are N.

Return Y in Excel If Either Cell Contains Y
Product
Microsoft Excel
Device & OS
not provided
Scenario
The user wants to combine two Y/N cell values into one result.
Observed behavior
E41 should show Y when at least one input is Y and N when both inputs are N.
Before you start

Check that C54 and C55 contain only Y or N if you plan to use the basic formula. If they can contain blanks or other values, use the formula that handles those values explicitly.

Solution 1Recommended

Use IF and OR for Y/N inputs

Use this formula when both input cells are restricted to Y or N.

1
Select the result cell

Click cell E41 in your Excel worksheet.

2
Enter the formula

Type =IF(OR(C54="Y",C55="Y"),"Y","N") in E41 and press Enter.

3
Check the result

Enter Y or N in C54 and C55. E41 returns Y if either cell is Y; it returns N if both are N.

Use IF and OR for Y/N inputs
Other input values: This formula also returns N when neither cell is Y, including when a cell is blank or contains another value. Use the alternative formula if N must appear only when both cells are N.
Calculate Y/N results in WPS

Return Y or N with a Formula in WPS Spreadsheets

Use the same IF and OR formula in WPS Spreadsheets to evaluate two cells and display the result in E41.

  1. 1. Open your spreadsheet: Launch WPS Spreadsheets and use Open to select your workbook.
  2. 2. Select E41: Click cell E41, where you want the result to appear.
  3. 3. Enter the formula: Type =IF(OR(C54="Y",C55="Y"),"Y","N") and press Enter.
  4. 4. Verify the result: Enter Y or N in C54 and C55 and check the result in E41.
Combine two Y/N inputs with IF and OROpen and edit Microsoft Excel XLSX and XLS filesWork with familiar spreadsheet formulas and cellsUse WPS Office for free
microsoft office alternative - wps office

Frequently Asked Questions

What happens if both C54 and C55 contain Y?

The IF and OR formula returns Y in E41 because at least one input is Y.

How can I return N only when both cells are N?

Enter =IF(OR(C54="Y",C55="Y"),"Y",IF(AND(C54="N",C55="N"),"N","")) in E41. Other combinations return an empty result unless one cell is Y.

Will the formula find Y inside a longer word?

No. C54="Y" and C55="Y" test whether the entire cell value equals Y, not whether Y appears within longer text.

Does the formula distinguish uppercase Y from lowercase y?

No. Excel's standard text comparison is case-insensitive, so a lowercase y also matches "Y".