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
  • How to automatically generate serial numbers in Excel? Summary of popular tips across the internetIn 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
    2025-12-10 science and technology
  • How to type a comma on the computerIn daily computer use, entering the comma (,) is a common need, especially when writing or editing documents in Chinese. However, many users may not know how to quickly type comma on the keyboard. This article will introduce the comma input method in detail, and attach hot topics and hot content in the past 10 days to help readers better master this skill.1. How to input commaThe pa
    2025-12-08 science and technology
  • How to set up Huawei macroWith the continuous upgrading of smartphone photography functions, macro photography has become one of the focuses of users. Huawei mobile phones provide users with an excellent macro shooting experience with their powerful imaging systems. This article will introduce in detail how to set up Huawei's macro mode, and attach data on recent hot topics across the Internet to help you better mast
    2025-12-05 science and technology
  • How to know the computer graphics card modelWhen using your computer on a daily basis, knowing your graphics card model is important for gaming performance, graphics design, or driver updates. This article will introduce several simple methods to check the computer graphics card model, and attach the hot topics and hot content in the past 10 days for reference.Method 1: View through system informationIn Windows syste
    2025-12-03 science and technology
Recommended articles
Reading rankings
Friendly links
Dividing line