# How to number rows with multiple condition using arrayformula on spreadsheet

114
March 10, 2022, at 3:20 PM

Column Number is the numbers of column Integer starts on 1 and so on, and if there is multiple number on the column Integer so will the Number make multiple number too.

I succed using formula `=IF(B2="","",IF(ROW(B2)=2,1,IF(B2=B1,A1,A1+1)))`

which is i should copy for each rows. But i want a single formula that can apply for not blank colB such as using arrayformula but i haven't solved it yet. Thanks for your time :).

Number Integer
1 1
2 3
3 5
3 5
4 6
4 6
4 6
5 7
6 8
6 8

use:

``````=ARRAYFORMULA(IFNA(VLOOKUP(B2:B, {UNIQUE(B2:B), SEQUENCE(COUNTUNIQUE(B2:B)+1)}, 2, 0)))
``````

POPULAR ONLINE

### Adding a number with a plus button

I want to make a button that will ad a number to existing fieldMy code:

99

### Select author automatically in Wordpress importer

If you're importing posts to Wordpress and the author is already on the new Wordpress, there is no default way to select the author in the list

131