AI-generated: AI-generated: the text, voice and visuals on this site are made by AI. Every formula is tested on sample data by the Cellwise checker.

Auto-number invoices (INV-0001, INV-0002) with a formula


invoice text freelancer

Generate invoice numbers that count up as you fill in rows, with leading zeros.

The problem

Typing invoice numbers by hand leads to gaps and repeats.

Formula

In A2, fill down. It counts the filled cells in column N:

="INV-"&TEXT(COUNTA(N$2:N2),"0000")

Result for the first filled row: INV-0001, then INV-0002.

Excel vs Sheets

Same formula. TEXT format codes can depend on your language and regional settings, so check the result.

Tested on sample data by the Cellwise checker (log CW-PL-20261018-42). AI-made: the text, voice and visuals are generated by AI.

Checked before publishing: a check.