1

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?

1
  • Always add an example of the input data and the result you are expecting....
    – user55949
    Oct 4, 2019 at 15:42

1 Answer 1

1

=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, ), ))

0

1
  • Where's the explanation?
    – user55949
    Oct 4, 2019 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.