How to Find All Factors of a Number in WPS Office Excel Using Formulas
Question details
The user needs a formula to generate all positive factors of a number in an Excel-compatible spreadsheet and return them vertically, horizontally, or as a comma-separated list.

- Product
- WPS Office Spreadsheets
- Device & OS
- not provided
- Scenario
- The user has a source number in a cell and needs the full list of its factors for calculations, analysis, reporting, or teaching.
- Observed behavior
- The desired result is a dynamic array factor list that updates automatically when the input number changes.
Confirm that your WPS Office version supports dynamic array functions such as LET, SEQUENCE, FILTER, and TEXTJOIN. Enter the number to factor in a single cell, for example A2, and leave adjacent blank cells for the spilled result.
Return Factors Vertically with a Dynamic Array Formula
Use this when you want each factor in its own cell down a column, starting from the formula cell.
The LET function stores the input number, SEQUENCE creates every integer from 1 to that number, FILTER keeps only numbers that divide the input evenly, and MOD returns zero for exact divisors.
Click the cell where the vertical factor list should begin, such as B2.
Type =LET(Num,A2,All,SEQUENCE(Num),FILTER(All,MOD(Num,All)=0)) in the formula bar and press Enter.
WPS Excel spills the factors down the column; ensure the cells below are empty so all factors appear.

Return Factors Horizontally with TRANSPOSE
Use this when you want the factor list to run across a row instead of down a column.
Return All Factors in One Cell as a Comma-Separated List
Use this when you need a single cell containing all factors separated by commas for reports, labeling, or concatenation.
Use WPS Office Spreadsheets to Generate All Factors in Excel-Compatible Workbooks
WPS Office supports LET, SEQUENCE, FILTER, TRANSPOSE, and TEXTJOIN, so you can build the same dynamic factor formulas in WPS Spreadsheets and save them in Microsoft Excel .xlsx format without losing functionality.
- 1. Open WPS Spreadsheets: Launch WPS Office and create a new workbook or open an existing .xlsx file.
- 2. Enter the number: Type the number to factor into a cell such as A2.
- 3. Apply the factor formula: Enter =LET(Num,A2,All,SEQUENCE(Num),FILTER(All,MOD(Num,All)=0)) in the output cell and press Enter.
- 4. Save in Excel format: Go to Menu > Save As and choose Microsoft Excel Workbook .xlsx to keep full compatibility.

Frequently Asked Questions
Can I use these factor formulas in older Excel or WPS versions without dynamic arrays?
These formulas require dynamic array support, including LET, SEQUENCE, and FILTER. In older versions that do not support dynamic arrays, you may see compatibility errors and would need a helper column or a different non-dynamic approach.
Why do I get a #SPILL! error after entering the formula?
The #SPILL! error usually means something is already in the cells where the formula wants to place the factor list. Remove or move the blocking data so the spill range is completely empty.
Does the factor list update when the original number changes?
Yes. The formulas reference cell A2, so WPS Office Excel recalculates the factor list automatically whenever the number in A2 changes.
Is there a practical limit to the number I can factor with SEQUENCE?
SEQUENCE(Num) creates an array from 1 to Num, so very large numbers create large arrays and may slow down calculation or consume memory. For typical use, the formula works best with reasonably sized positive integers.
Will these formulas work in both WPS Office and Microsoft Excel?
Yes. Current versions of WPS Office and Microsoft Excel that support LET, SEQUENCE, FILTER, TRANSPOSE, and TEXTJOIN can run these formulas with the same .xlsx workbook format.




