Formula Errors

Excel Formula to Divide a Number into Sequential Sections

Phi Hung VoPhi Hung Vo Nov 2, 2026 868 views

Question details

The user needs to divide a total quantity into sequential numerical text ranges across a specified number of sections or cells.

How to Create an Excel Formula to Divide a Number into Sections
Product
Excel
Device & OS
not provided
Scenario
Organizing a total quantity (such as 23 pallets) into evenly distributed sequential text ranges across multiple columns.
Observed behavior
The goal is to input a total number and a target number of sections, then output sequential text ranges (e.g., '1-6', '7-12') into adjacent columns.
Before you start

Ensure you have designated specific cells in your worksheet for your total number and the number of sections to reference in your formula.

Solution 1Recommended

Use a Combined IF, COLUMN, and CEILING Formula

This formula dynamically calculates the start and end of each sequence range and formats it into sequential text strings across your columns.

This method uses the CEILING function to determine the size of each section based on the total. It then uses the COLUMN function to increment the numbers appropriately as you drag the formula across multiple columns.

1
Set Up Your Reference Cells

Enter your total number in a specific cell (e.g., cell O2). Next, enter the number of sections you want to divide the total into in another cell (e.g., cell P2).

2
Enter the Formula

Select the first output cell where you want the first range to appear. Type the formula: =IF(COLUMN(A2)>$P2,"",(COLUMN(A2)-1)*CEILING($O2/$P2,1)+1&"-"&IF(COLUMN(A2)=$P2,$O2,COLUMN(A2)*CEILING($O2/$P2,1))) and press Enter.

3
Auto-fill Across Columns

Click and drag the fill handle (the small square at the bottom-right of the cell) across the adjacent columns to generate the remaining sequential ranges.

Use a Combined IF, COLUMN, and CEILING Formula
Reference Adjustment: If your total and section numbers are in different cells, you must adjust the $O2 and $P2 absolute references in the formula to match your worksheet.
WPS Office Features

Create Advanced Formulas Easily in WPS Spreadsheet

WPS Spreadsheet provides full support for complex mathematical and logical functions, allowing you to easily calculate and divide numbers into sequential ranges. It offers comprehensive compatibility with Microsoft Excel formulas.

  1. 1. Open Your Document: Launch WPS Spreadsheet and open the workbook where you need to partition your data.
  2. 2. Input Your Variables: Enter your total value and the number of target sections into two separate reference cells.
  3. 3. Apply the Formula: Paste the combined IF and CEILING formula into your first target cell, adjust your cell references, and press Enter.
  4. 4. Drag to Auto-fill: Drag the fill handle horizontally across the columns to instantly generate all sequential sections.
Seamless compatibility with Microsoft Excel (.xlsx) formats and advanced formula syntax.Free, lightweight, and fast-loading spreadsheet application.Intuitive user interface that makes writing and adjusting complex formulas straightforward.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my formula return a #NAME? error?

This error usually occurs if there is a typo in the function names (such as typing 'CELING' instead of 'CEILING'). Double-check the spelling of all functions in your formula bar.

Can I divide the sequential ranges vertically into rows instead of columns?

Yes. To divide sequential ranges vertically down rows, you will need to replace the COLUMN() function with the ROW() function in the formula.

What happens if the total number does not divide evenly?

The CEILING function automatically rounds the division up to the nearest integer. The final section will be formulated to end exactly at the original total number specified in your reference cell.