Home > Back-end >  Google Sheets - Label Value (Name) by Occurrence (1st, 2nd, 3rd, etc.), ordered by Corresponding Dat
Google Sheets - Label Value (Name) by Occurrence (1st, 2nd, 3rd, etc.), ordered by Corresponding Dat

Time:09-24

I'm looking to add a Label column to count the occurrence of a particular Name by Date.

desired outcome

Thank you for any help!

CodePudding user response:

I've added a new sheet ("Erik Help"). There, I deleted everything from C2:C and then entered the following formula in C2:

=ArrayFormula(IF(A2:A="",,COUNTIFS(A2:A,A2:A,B2:B,"<="&B2:B)))

This formula first checks to see if any cell in A2:A is blank. If it is, then the corresponding cell in C2:C is also left blank.

Otherwise, COUNTIFS counts name matches (A2:A,A2:A) that are less than or equal to each row's date (B2:B,"<="&B2:B), which produces the results you're wanting.

  • Related