Calculation Issues

How to Reduce a Number Until a Product Meets a Target in WPS Office Spreadsheets

Algirdas JasaitisAlgirdas Jasaitis Nov 13, 2026 869 views

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.

How to Reduce a Number Until a Product Meets a Target in WPS Office Spreadsheets
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.
Before you start

Open your WPS Office Spreadsheets workbook and make sure A1 and B1 contain positive whole numbers, while C1 contains the maximum allowed product.

Solution 1Recommended

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.

1
Select the result cell

Click an empty cell, such as D1, where you want the adjusted factor to appear.

2
Enter the formula

Type =IF(A1*B1>C1,QUOTIENT(C1,A1),B1) and press Enter.

3
Check the returned value

Confirm that the cell shows the largest whole-number B1 value whose product with A1 does not exceed C1.

Use an IF and QUOTIENT formula to return the reduced factor
Formula returned a capped factor: If A1=7, B1=6, and C1=40, the formula returns 5 because 7×5=35 is within 40.
WPS Spreadsheets calculation

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. 1. Download and install WPS Office: Download WPS Office from the official website, run the installer, and launch WPS Office Spreadsheets.
  2. 2. Open your workbook: Open the .xlsx file that contains the factors and the target product limit, or create a new spreadsheet.
  3. 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. 4. Apply the formula: Select D1, type =IF(A1*B1>C1,QUOTIENT(C1,A1),B1), and press Enter.
  5. 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.
Uses the same Excel-compatible formula engine for IF and QUOTIENT calculationsOpens, edits, and saves .xlsx workbooks with full Microsoft Excel compatibilityFree, lightweight spreadsheet app with a familiar ribbon interfacePerforms the whole-number cap calculation without requiring macros or add-ins
microsoft office alternative - wps office

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.