Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I have a list of items purchased, like below.
A | B | C | D | E |
id | item | qty | unit price | subtotal |
I'd like to have the column id to automatically increment correctly in each row where the subtotal is not null. How can I do it?
=ARRAYFORMULA(IF(LEN(B2:B), SUBSTITUTE(COUNTIFS(IF((LEN(E2:E)) * (E2:E>0), 1, ),
IF((LEN(E2:E)) * (E2:E>0), 1, ), ROW(B2:B), "<="&ROW(B2:B)), 0, ), ))
Required, but never shown