Welcome to visit Yellow cherry!
Current location:front page >> science and technology

How to get serial number in excel

2025-12-10 15:57:31 science and technology

How to automatically generate serial numbers in Excel? Summary of popular tips across the internet

In daily office work, the serial number generation function of Excel is one of the high-frequency needs. Whether you are making tables, statistics, or organizing lists, automatically generating serial numbers can greatly improve efficiency. This article will combine the popular discussions on the Internet in the past 10 days to summarize5 practical methods, and comes with structured data comparison to help you quickly master the skills!

Directory

How to get serial number in excel

1. Drag and fill method (basic operation)
2. ROW function method (dynamic serial number)
3. SUBTOTAL function method (continuous serial numbers after filtering)
4. Customized formula method (complex scenarios)
5. Table tool method (structured citation)

1. Drag and drop filling method

This is the most basic way to generate serial numbers, suitable for simple lists:

stepsOperating Instructions
1Enter the initial sequence number (such as 1) in the starting cell
2Select the cell, drag the fill handle in the lower right corner and drag it downwards
3After releasing the mouse, click "Autofill Options" and select "Fill Sequence"

Disadvantages:The serial number will not be updated automatically when a row is deleted and needs to be adjusted manually.

2. ROW function method

Dynamic serial numbers are implemented through functions, and rows are automatically rearranged after deletion:

formulaDescriptionExample
=ROW()-1Generate serial numbers starting from line 2 (the first line is the title)If the formula is in cell A2, 1 will be displayed
=ROW(A1)Reference cell row numberAutomatically increment when filling down

3. SUBTOTAL function method

Keep serial numbers continuous when filtering data, suitable for dynamic reports:

formulaParameter description
=SUBTOTAL(3,$B$2:B2)3 represents the COUNTA function, counting non-empty cells

Effect:After filtering, the serial numbers of hidden rows will be automatically skipped, and the visible rows will remain continuous.

4. Custom formula method

Complex scenarios (such as merging cells) can be combined with the IF function:

sceneFormula example
Skip blank lines=IF(B2="","",MAX($A$1:A1)+1)
Group number=IF(B2<>B1,1,A1+1)

5. Form tool method

Convert range to table (Ctrl+T), automatically enabling structured references:

AdvantagesDescription
auto-expansionThe serial number is automatically extended when new data is added.
Formula simplificationUse column names instead of cell references (such as [serial number])

Top 5 most popular questions on the Internet (last 10 days)

Rankingquestionsolution
1Serial numbers are not consecutive after deleting rowsROW function or table tool
2Serial numbers are confused after filteringSUBTOTAL function
3Merge cell numbersCustom IF formula
4Classification grouping number=IF(condition,1,previous cell+1)
5Reference serial numbers across worksheetsINDIRECT+ROW combination

Summary

Choose the appropriate method according to actual needs:
simple list:Drag fill or ROW function
dynamic report:SUBTOTAL function
complex structure: Custom formula + conditional judgment
long term maintenance: Table Tool Structured Reference

After mastering these skills, generating Excel serial numbers will no longer be a problem! If you need further optimization, you can pay attention to advanced gameplay such as conditional formatting and VBA macros.

Next article
  • What should I do if Tantan is blocked?Recently, the social platform Tantan has been removed from the shelves or restricted in use by some app stores due to content review issues, which has aroused widespread concern among users. If you are facing the problem of "What should I do if Tantan is blocked?", this article will provide you with a structured solution, and attach a reference to the hot topic data of the entire
    2026-01-24 science and technology
  • How to set up anti-theft tracking? Popular topics and practical guides on the Internet in the past 10 daysWith the popularity of smart devices, anti-theft tracking technology has become a hot topic recently. This article will combine the hot content of the entire network in the past 10 days to provide you with a detailed analysis of how to set up anti-theft tracking and provide structured data reference.1. Popular to
    2026-01-21 science and technology
  • How to use format factoryIn the past 10 days, hot topics and hot content on the entire network have mainly focused on technology, entertainment, social news and other fields. Among them, the use of the tool "Format Factory" has also become the focus of many users. This article will introduce the use of format factory in detail and attach relevant data for reference.1. Introduction to Format FactoryFormat Factory is a
    2026-01-19 science and technology
  • How to synchronize data with AppleIn today's digital era, data synchronization has become an important requirement for users to use it seamlessly across devices. The Apple ecosystem provides efficient data synchronization solutions through iCloud, AirDrop and other functions. This article will introduce in detail the method of data synchronization between Apple devices, and attach hot topics and hot content in the pa
    2026-01-16 science and technology
Recommended articles
Reading rankings
Friendly links
Dividing line