How to Reduce a Number Until a Product Meets a Target in WPS Office Spreadsheets
Question details
The user needs a formula that automatically reduces one factor in whole-number increments until the product is less than or equal to a specified maximum.

- Product
- WPS Office Spreadsheets
- Device & OS
- not provided
- Scenario
- The user has two factors and a maximum product limit, and wants to return the adjusted whole-number factor directly in a cell.
- Observed behavior
- The original factor may create a product above the limit; the goal is a calculated result that keeps the product within the maximum.
Open your WPS Office Spreadsheets workbook and make sure A1 and B1 contain positive whole numbers, while C1 contains the maximum allowed product.
Use an IF and QUOTIENT formula to return the reduced factor
Use this when the original factors produce a product over the limit and you want the largest whole-number factor that stays within the target.
This formula assumes positive whole numbers. If the current product is already within the limit, the original B1 value is returned.
Click an empty cell, such as D1, where you want the adjusted factor to appear.
Type =IF(A1*B1>C1,QUOTIENT(C1,A1),B1) and press Enter.
Confirm that the cell shows the largest whole-number B1 value whose product with A1 does not exceed C1.

Calculate a Capped Product Factor in WPS Office Spreadsheets
WPS Office Spreadsheets supports the same IF and QUOTIENT functions as Excel, so you can enter the target-product formula directly and get the adjusted whole-number factor without changing your workflow.
- 1. Download and install WPS Office: Download WPS Office from the official website, run the installer, and launch WPS Office Spreadsheets.
- 2. Open your workbook: Open the .xlsx file that contains the factors and the target product limit, or create a new spreadsheet.
- 3. Enter the input values: Put the fixed factor in A1, the factor to reduce in B1, and the maximum allowed product in C1.
- 4. Apply the formula: Select D1, type =IF(A1*B1>C1,QUOTIENT(C1,A1),B1), and press Enter.
- 5. Verify the capped product: Check that D1 returns the largest whole-number B1 value whose product with A1 is less than or equal to C1.

Frequently Asked Questions
What does the formula =IF(A1*B1>C1,QUOTIENT(C1,A1),B1) return?
It returns the largest positive whole-number adjustment of B1 that keeps A1 multiplied by B1 within C1. If the original product is already within the limit, it returns B1 unchanged.
Can I use this formula in WPS Office Spreadsheets exactly as in Excel?
Yes. WPS Office Spreadsheets supports the IF and QUOTIENT functions and accepts the same Excel-style formula syntax.
What happens if my factors contain decimals?
This formula is intended for positive whole numbers. For decimal factors, use a division-based formula such as =IF(A1*B1>C1,C1/A1,B1) and format the result as needed.
Why does the formula show #DIV/0!?
The #DIV/0! error occurs when A1 is zero because QUOTIENT divides by A1. Make sure A1 contains a positive whole number.




