First off, here is my formula:
=XLOOKUP(MAXIFS(D:D,E:E,">0"),(B:B=F2)*(A:A="EFP")*D:D,C:C,,-1)
| CAMPAIGN | RECORD PHONE# | REP # | PAYMENT DATE | PAYMENT AMT | LEAD PHONE NUMBER | LASTREP | 
|---|---|---|---|---|---|---|
| MOL | 4255555666 | 3608 | 7/22/2022 | $3000 | 4255555666 | |
| EFP | 4255555666 | 3608 | ||||
| BHS | 4255555666 | 1156 | 5/22/2009 | $3000 | ||
| BHS | 4255555666 | 1156 | 2/3/2007 | $2000 | 
What this is doing is finding the last representative that sold a lead in a specific campaign and had it pay.
My issue is that if there is no match, it is giving me a random representative instead of n/a or blank, and I can't set exact match because it is breaking the formula.
How can I use this code to get an exact match?
