In Google Sheets,
I want to achieve a serial numbering system in a specific manner which satisfies the following requirements:
Test Cases:
Can anyone please provide a formula or steps to implement this feature in Google Sheets?
use this formula:
=ARRAYFORMULA(IFERROR(VLOOKUP(ROW(B:B)&B:B, QUERY({SORT({ROW(
INDIRECT("B1:B"&COUNTA(B:B))), FILTER(ROW(B:B)&B:B, B:B<>"")}, 1, 0), ROW(
INDIRECT("B1:B"&COUNTA(B:B)))}, "select Col2,Col3", 0), 2, 0)))