google sheet : create incremental number for multiple merged cells

Viewed 300

I want to make incremental number in a column. When using formula , i can refer the cell before and add to 1 and it works (For example in A2 i can use A1+1 and copy down the formula to A3 to A500 ).

But in this case, i can't use formula because the cell has been merged randomly (Pls check the screenshot) , so i can't refer to previous cell.

I also try to manually select 2 last number (in this example 4 and 5 ) and drag that lower right corner handle and drag down, but the result will override the cell formatting. The previously setup merged cells will be destroy.

What is the best way to do it ?

Thanks

enter image description here

1 Answers

In the first merged range enter 1 and in the second enter formula:

=MAX($A$1:A2)+1

(change A2 to cell address before second range - in your sample case A4), then copy formula, select desired range where to paste and paste special -> formula only

enter image description here

Related