Friday, August 4, 2023

How to generate sequence id number in Excel


We can generate sequence number using row is haivng data 


Following is the formula to generate sequence number in A2 column when B2 column 
```sh
	IF(ISBLANK(B2),"",COUNTA(B$2:B2))

# We can also do it with sequence formula , Note 1 is offset  if we used first row for header

SEQUENCE(COUNTA(B:B)-1)

```

We can do it both COUNTA and Sequence when data in column B is not empty

```sh
	IF(ISBLANK(B2),"",SEQUENCE(COUNTA(B$2:B2)))

	# if want to fill the sequence number when entered data in cell
 	Ctrl+G   then cick on Special then click on blanks
```

No comments:

Post a Comment