Function Problems

How to Use an IF Formula to Assign Values to Multiple Cells in WPS Office Excel

John WilsonJohn Wilson Nov 13, 2026 869 views

Question details

The user needs to know whether one Excel IF formula can set values in two separate cells when a condition is true, and how to achieve that result.

How to Use an IF Formula to Assign Values to Multiple Cells in WPS Office Excel
Product
WPS Office Spreadsheets
Device & OS
not provided
Scenario
Building a spreadsheet condition that should update two destination cells from one logical test, such as changing B1 and C1 when A1 equals Yes.
Observed behavior
A standard worksheet formula cannot write to multiple cells by itself; each destination cell must contain its own formula, or a macro must be used.
Before you start

Open your workbook in WPS Office Spreadsheets and identify the condition cell, such as A1, and the two destination cells, such as B1 and C1, that should respond to the condition.

Solution 1Recommended

Use a Separate IF Formula in Each Destination Cell

This is the standard and fastest way to update multiple cells because each cell evaluates the same condition independently.

Worksheet formulas return a value only to the cell where they are entered. To update B1 and C1 from A1, place an IF formula in both B1 and C1 instead of expecting one formula to control multiple cells.

1
Select the first destination cell

Click cell B1 in your WPS Office Spreadsheets workbook, or select the first cell that should show a result.

2
Enter the first IF formula

Type =IF(A1="Yes",1,"") and press Enter. This displays 1 when A1 equals Yes and leaves the cell blank otherwise.

3
Select the second destination cell

Click cell C1, or select the second cell that should show a different result.

4
Enter the second IF formula

Type =IF(A1="Yes",2,"") and press Enter. This displays 2 when A1 equals Yes and leaves the cell blank otherwise.

Use a Separate IF Formula in Each Destination Cell
Result: Both cells now respond to the same A1 condition without needing a macro.
Spreadsheet formula solution

Apply IF Logic to Multiple Cells in WPS Office Spreadsheets

WPS Office Spreadsheets uses the same IF function syntax as Excel. Enter a separate IF formula in each target cell to update multiple cells from one condition while keeping full .xlsx compatibility.

  1. 1. Open your workbook in WPS Office Spreadsheets: Launch WPS Office, click Open, and select the Excel workbook that contains your condition cell.
  2. 2. Enter the first IF formula: Select the first result cell, type =IF(A1="Yes",1,""), and press Enter.
  3. 3. Enter the second IF formula: Select the second result cell, type =IF(A1="Yes",2,""), and press Enter.
  4. 4. Test the condition: Change A1 to Yes or another value to verify that both result cells update correctly.
Uses the familiar Excel IF formula syntax, so no new formulas to learnOpens, edits, and saves Microsoft Excel .xlsx files with full format compatibilityFree and lightweight spreadsheet tool with a familiar ribbon interfaceSupports VBA macros for advanced multi-cell automation when needed
microsoft office alternative - wps office

Frequently Asked Questions

Can one Excel formula write data into multiple cells?

No, a standard worksheet formula returns a value only to the cell in which it is entered. To update multiple cells, enter a separate IF formula in each target cell.

How do I make two cells change when A1 says Yes?

In B1 enter =IF(A1="Yes",1,"") and in C1 enter =IF(A1="Yes",2,""). Both formulas use the same A1 condition independently.

Does this work in WPS Office Spreadsheets the same way as Excel?

Yes, WPS Office Spreadsheets supports the same IF function syntax and can open and save Microsoft Excel .xlsx workbooks.

Can I use VBA to write to multiple cells at once?

Yes, a macro can check a condition and assign values to several cells, but it requires a macro-enabled workbook and is not needed for basic worksheet formulas.

What if I want different text or numbers in each cell?

Replace the value_if_true and value_if_false arguments in each cell, for example =IF(A1="Yes","Approved",""). Keep a separate formula in each destination cell.