Search code examples
if-statementgoogle-sheetsgoogle-sheets-formulaarray-formulascounting

Apply formula for rows with first occurence of text


I want to achieve something like the image below:

enter image description here

How can I do it?


Solution

  • use this formula:

    =ARRAYFORMULA(IF(COUNTIFS(A:A, A:A, ROW(A:A), "<="&ROW(A:A))=1, 
     "first occurance", ))
    

    0