Excel fills the merged cells with serial numbers

1. Problem description

提示:这里描述项目中遇到的问题:

When using excel, have you ever encountered a situation where you need to sort merged cells? The drop-down will show that the same cells are required, as shown in the figure:
Insert image description here


2. Solution

The purpose is to count cells, so you can use the COUNT, COUNTA or MAX function

Usage is as follows:

  • First select the cells that need to be filled with serial numbers.
  • Enter the following formula
  • Just press the ctrl+ buttonEnter
=COUNTA(A$1:A1)

Insert image description here

=MAX(A$1:A1)+1

Insert image description here

=COUNT(B$1:B1)+1

Insert image description here

2. Excel knowledge points

  • A$1: represents an absolute line reference

  • $A1: represents an absolute column reference

  • Absolute reference, select the cell in the formula row and press F4 to switch

  • Remember: whoever is preceded by the dollar sign is absolutely quoted.
    Insert image description here

  • The COUNTA function
    is used to count the number of non-empty cells in a range, and can count logical values, text or error values.

As shown in the figure below, you need to count how many non-empty cells there are. At this time, you can directly enter the formula =COUNTA(C1:C9) and press Enter: so the formula used above:
Insert image description here
=COUNTA(A$1:A1), then It can be seen clearly why it starts from cell a1. The content of cell a1 is [serial number], which is not empty, so the value is 1.

4. Reference links

How to quickly fill a sequence with merged cells

Guess you like

Origin blog.csdn.net/qq_36292543/article/details/130961585