I'm trying to count the number of occurrence in previous rows based on two conditional values using Google Sheet.
Let say this is my table :
| Row A | Row B | Row C | Row D |
|---|---|---|---|
| 1 | John | Smith | |
| 2 | Marty | Butler | |
| 3 | John | Herbert | |
| 4 | John | Smith | |
| 5 | Philip | Rand | |
| 6 | John | Smith | |
| 7 | Marty | Butler |
Is there a formula that exist that can count those occurrences. The idea is that when I log a new name, if Row B and C already exist it increase the value in Row D by 1 so I would know that it is the nth entry under that name. In my example, Row D would looks like this:
| Row A | Row B | Row C | Row D |
|---|---|---|---|
| 1 | John | Smith | 1 |
| 2 | Marty | Butler | 1 |
| 3 | John | Herbert | 1 |
| 4 | John | Smith | 2 |
| 5 | Philip | Rand | 1 |
| 6 | John | Smith | 3 |
| 7 | Marty | Butler | 2 |