Function Problems

Use an Excel IF Formula to Set Priority 9 for Condition A

Camila MilosovichCamila Milosovich Nov 18, 2026 870 views

Question details

The user needs a formula that returns priority 9 when a condition is A and displays a blank result otherwise.

Use an Excel IF Formula to Set Priority 9 for Condition A
Product
Microsoft Excel
Device & OS
not provided
Scenario
Assign a priority based on a condition in a worksheet cell.
Observed behavior
The desired result is 9 for condition A and a blank result for other conditions.
Before you start

Identify the cell containing the condition and choose an empty cell for the formula. The examples below assume the condition is in A2 and, when checking an existing priority, the priority is in B2.

Solution 1Recommended

Return priority 9 when the condition is A

Use this formula when you want Excel to calculate the priority automatically.

1
Enter the formula

Select an empty result cell, such as B2, and enter =IF(A2="A",9,""). Press Enter.

2
Apply it to other rows

Drag the fill handle from the result cell down the column. Replace A2 in the formula if your condition is stored in a different cell.

Return priority 9 when the condition is A
Blank results: The formula returns an empty text string when the condition is not A, so the result cell appears blank.
Calculate priorities in WPS Spreadsheets

Set priority 9 with an IF formula in WPS Spreadsheets

Use WPS Spreadsheets to enter the same IF formula, fill it down your worksheet, and save the result in an Excel-compatible format.

  1. 1. Open your worksheet: Open WPS Spreadsheets and select Open to load your workbook.
  2. 2. Enter the formula: Select an empty result cell and enter =IF(A2="A",9,""). Replace A2 with the cell containing your condition, then press Enter.
  3. 3. Fill down and save: Drag the result cell's fill handle down the column, then choose File > Save or Save As to save the workbook.
Automatically return priority 9 for condition AOpen and save Microsoft Excel XLSX filesCopy formulas down a column with the fill handle
microsoft office alternative - wps office

Frequently Asked Questions

How do I change the condition cell in the formula?

Replace A2 in =IF(A2="A",9,"") with the cell that contains your condition. For example, use C2 if the condition is in column C.

Does the formula distinguish between uppercase and lowercase A?

No. The comparison A2="A" is not case-sensitive, so it also matches a lowercase a.

How can I check a priority someone has already entered?

If the condition is in A2 and the priority is in B2, enter =IF(A2="A",IF(B2=9,"OK","Priority must be 9"),"") in another cell.

Why does the result look blank for other conditions?

The final "" in the IF formula returns an empty text string when the condition is not A. The cell contains a formula even though it appears blank.