Allow Manual Input with a Conditional Formula in Excel
Question details
Display N/A when a control cell contains No, while allowing a manually entered value to appear when it contains Yes.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet needs a conditional result that can also show a user's manual entry.
- Observed behavior
- Typing directly into the formula cell replaces its formula.
Choose a control cell, a display cell, and a separate cell for manual input. The example below uses B5 for Yes or No, C5 for the result, and D5 for the manual entry.
Use a Separate Input Cell and an IF Formula
Use this approach to keep the formula intact without macros.
A standard Excel cell cannot hold a formula and a separate manual value at the same time. The formula in C5 displays N/A when B5 is No and otherwise displays the value from D5.
Select B5 and enter Yes or No.
Select C5, type =IF(B5="No","N/A",D5), and press Enter.
Select D5 and type the value you want C5 to display when B5 is Yes. Do not type directly into C5.
Change B5 to No to show N/A in C5, then change it to Yes to show the value from D5.

Combine a Conditional Formula and Manual Input in WPS Spreadsheet
Use a separate input cell and an IF formula in WPS Spreadsheet to keep your conditional result while allowing manual entry.
- 1. Open the spreadsheet: Open WPS Office, select Spreadsheet, and open your workbook.
- 2. Set the condition: Enter Yes or No in cell B5.
- 3. Add the formula: Select C5, enter =IF(B5="No","N/A",D5), and press Enter.
- 4. Enter and test the value: Type a value in D5, then change B5 between Yes and No to check the result in C5.

Frequently Asked Questions
Can I type a value into an Excel cell without replacing its formula?
No. Typing directly into a standard formula cell replaces the formula. Enter the value in a separate cell and reference it in the formula instead.
How can I prevent a blank input cell from displaying 0?
In C5, use =IF(B5="No","N/A",IF(D5="","",D5)). This leaves C5 blank when D5 is blank and B5 is not No.
Does the formula produce the Excel #N/A error?
No. The quoted "N/A" in =IF(B5="No","N/A",D5) is text, not the #N/A error value.
Can VBA write N/A directly into the entry cell?
Yes. A worksheet change event can write a value in response to edits, but it requires VBA code. Save the workbook as an XLSM file and enable macros only if you trust the workbook.




