Function Problems

How to Create Excel Formulas to Return Different Values by Row

Phi Hung VoPhi Hung Vo Nov 10, 2026 868 views

Question details

The user needs an Excel formula setup that calculates and outputs different specific values in sequential rows, such as B11, B12, and B13, and seamlessly accommodates newly added data rows.

How to Create Excel Formulas to Return Different Values by Row
Product
Excel
Device & OS
not provided
Scenario
Generating varying row-by-row outputs based on specific reference data or conditions while ensuring the formula structure expands easily for future data entries.
Observed behavior
The user wants to transition from manually typing values to a scalable formula structure where calculations automatically populate correctly down a column without breaking when adding new rows.
Before you start

Before setting up your formula, identify the data conditions determining your row values and check your Excel version, as Microsoft 365 supports automatic dynamic arrays while older versions require manual fill-down techniques.

Solution 1Recommended

Use a Dynamic Array Formula (Microsoft 365)

Best for Microsoft 365 users, a single dynamic array formula automatically spills the results into adjacent rows without the need for manual dragging.

Dynamic array formulas are powerful features in newer versions of Excel. When you write a formula that generates multiple values, Excel automatically fills the neighboring cells with those results.

1
Select the target cell

Click on the starting cell where you want your first result to appear, such as cell B11.

2
Input the array formula

Enter your rule-based formula referencing an entire input range rather than a single cell. For example, if evaluating column A, type =IF(A11:A100="Target","Value1","Value2").

3
Allow the formula to spill

Press the Enter key. The formula will automatically generate results and spill down the column for every evaluated row.

Use a Dynamic Array Formula (Microsoft 365)
Handling the #SPILL! Error: Ensure the cells directly below your formula cell are completely empty. Any existing text, spaces, or data will block the formula from expanding and trigger a #SPILL! error.
Efficient Formula Management in WPS Spreadsheet

Easily Manage Dynamic Formulas with WPS Spreadsheet

WPS Office Spreadsheet provides a robust and highly compatible environment for handling complex formulas, array calculations, and large datasets seamlessly. You can easily set up conditional formulas that automatically apply to new rows.

  1. 1. Open your workbook in WPS Spreadsheet: Launch WPS Office and open your existing spreadsheet file or create a new one.
  2. 2. Input your formula: Select the starting cell, such as B11, and input your conditional or lookup formula for that row.
  3. 3. Confirm the calculation: Press Enter to confirm the calculation for the initial cell.
  4. 4. Copy the formula down: Double-click or drag the fill handle at the bottom-right corner of the cell to copy the formula down to B12, B13, and any newly added rows. Relative references will adjust automatically.
Fully compatible with Microsoft Excel formulas, functions, and file formats (.xlsx).Intuitive auto-fill handle for applying formulas across multiple rows effortlessly.Lightweight performance when handling large files with heavy row-by-row calculations.Free to download and use with a familiar, easy-to-navigate tabbed interface.
microsoft office alternative - wps office

Frequently Asked Questions

Why is my dynamic formula showing a #SPILL! error?

A #SPILL! error occurs when an array formula cannot expand because a cell in its intended path is not empty. Clear any text, hidden spaces, or formatting in the cells below your formula to resolve the issue.

How do I ensure my formulas automatically apply to newly added rows?

You can convert your data range into an official Table format. Highlight your data and press Ctrl+T. When you add a new row to an Excel Table, the formulas in calculated columns will automatically fill down.

Can I use IF functions to return different values based on multiple conditions?

Yes, you can nest IF functions or use the IFS function (in newer versions) to evaluate multiple conditions. For example, =IFS(A11>90, "A", A11>80, "B", TRUE, "C") will return different grades based on the score in column A.

Why doesn't my formula change row numbers when I drag it down?

If your row numbers aren't changing, you are likely using absolute cell references, which have dollar signs (like $A$1). Remove the dollar sign before the row number (e.g., change to $A1 or A1) to make the reference relative so it updates as you drag it down.