Numbering Cells Conditionally
There is an Excel file that teaches how to perform the Numbering Cells Conditionally operation.
Excel Solution: Numbering Cells Conditionally
This workbook demonstrates numbering cells conditionally using VBA macros on a 1-row data layout.
Hope it is useful.