How to Create Excel Formulas to Return Different Values by Row
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.

- 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 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.
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.
Click on the starting cell where you want your first result to appear, such as cell B11.
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").
Press the Enter key. The formula will automatically generate results and spill down the column for every evaluated row.

Use a Traditional Fill-Down Formula (Older Excel Versions)
Ideal for older Excel versions where dynamic arrays are not supported. This method requires dragging a relative formula down the column.
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. Open your workbook in WPS Spreadsheet: Launch WPS Office and open your existing spreadsheet file or create a new one.
- 2. Input your formula: Select the starting cell, such as B11, and input your conditional or lookup formula for that row.
- 3. Confirm the calculation: Press Enter to confirm the calculation for the initial cell.
- 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.

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.




