I am looking for a formula that counts only unique values based on the conditions.
Scenario: As shown in the image, I have three different enrollment statuses "Enrolled", "Completed", and "In Progress". What I am trying to achieve:
Check if value of Column A values match/contain with Column F.
If it does, then look at Column G.
If a user has the status "Completed" or "Inprogress", then count those users as 1.
If the user status is "Enrolled", then do not count those users.
In B2 I should get the count 2, as "[email protected]" and "[email protected]" have the status "Completed" or "In Progress", whereas "[email protected]" doesn't have.
Can anyone please help me with this?

COUNTA,UNIQUEandFILTER