I have a sheet that collects forms submitted by Program Developers to request payment for work on program development. For the Payee, they can select a [Role] that is either Instructor, Subject Matter Expert (SME), Co-Instructor, or Co-SME. If they choose Co-Instructor or Co-SME, they are asked to enter a [Percentage] of the standard payment that person should receive (e.g., 50%). The default for Instructor and Subject Matter Expert (SME) is 100%.
I want to write a formula that checks if other payment requests have been submitted already for a specific [Program Code]. If another payment request was submitted for a different Payee for the same [Program Code], I want to flag the payment request submissions when
- More than on person has been submitted for payment for the same [Program Code] and both have designated roles as Instructor or Subject Matter Expert (SME), which would mean both would be wrongly paid 100% of the payment amount
- More than one person has been submitted for payment for the same [Program Code] and even if both have designated roles as Co-Instructor or Co-SME, the sums of their designated percentages are over 100%
Example 1: Two payment requests, same Program Code, both 100%
- Payment #1 (2-15-2025), John Doe, Program Code 5001, "Instructor", 100%
- Payment #2 (2-18-2025), Jessica Little, Program Code 5001, "Instructor", 100%
Example 2: Two payment requests, same Program Code, same Payee
- Payment #1 (2-18-2025), Milo Sutton, Program Code 5025, "Instructor", 100%
- Payment #2 (3-2-2025), Milo Sutton, Program Code 5025, "Instructor", 100%
Example 3: Two payment requests, same Program Code, sum of % is > 100
- Payment #1 (3-5-2025), Mya Reynolds, Program Code 5018, "Co-SME", 50%
- Payment #2 (3-19-2025), Phuong Taylor, Program Code 5018, "Co-SME", 70%
Example 4: Two payment requests, same Program Code, one is full SME, one Co-SME
- Payment #1 (3-1-2025), Daniel Glugman, Program Code 5006, "SME", 100%
- Payment #2 (3-14-2025), Linda Simpson, Program Code 5006, "Co-SME", 50%
Example 5: Two payment requests, same Program Code, different roles
- Payment #1 (3-7-2025), Lauren Klappst, Program Code 5014, "Instructor", 100%
- Payment #2 (3-22-2025), Peter Parker, Program Code 5014, "Co-SME", 50%
- Payment #3 (3-23-2025), Ismael Franklin, Program Code 5014, "Co-SME", 50%
Both payment requests for Examples 1, 2, 3, and 4 should be flagged. Example 5 should NOT be flagged even thought there are different roles, there is one instructor at 100% and two Co-SMEs at 50% each.
Any ideas?