I want to make a column that, based on the column to its left and the colour of the font, numbers itself chronologically. I would then like it to reset and start numbering the rows again when a new font colour arrives in the column. Basically, make a line item column.
I discovered a code, but it wasn't the one I required.

I tried other codes but nothing I found worked.