Search code examples
arraysgoogle-sheetscountgoogle-sheets-formulasequence

How to restart this letter incrementation based on a condition using Google Sheets Formula?


This formula does increment the letter, but how to make it re-start based on a condition in col A?

=A3&"-"&CHAR(ROWS($1:1)+64)

enter image description here

Here is a test sheet: https://docs.google.com/spreadsheets/d/1gh5w0czg2JuoA3i5wPu8_eOpC4Q4TXIRhmUrg53nKMU/edit?usp=sharing


Solution

  • use:

    =INDEX(IF(A3:A="",,A3:A&"-"&CHAR(COUNTIFS(A3:A, A3:A, ROW(A3:A), "<="&ROW(A3:A))+64)))
    

    enter image description here