WPS Spreadsheets: Flag the First Distinct Ticket Matching Multiple Conditions
Question details
Create a formula that marks only the first qualifying occurrence of each ticket ID when the escalation team is L2 Support and the assigning team is Product Team or Development Team.

- Product
- WPS Spreadsheets
- Device & OS
- not provided
- Scenario
- The user is reviewing a ticket list and needs a single flag for the first row meeting several ticket and team conditions.
- Observed behavior
- A standard COUNTIFS approach can return a flag more than once for the same ticket ID.
Confirm that Ticket ID values are in column A, the escalation team is in column E, and the assigning team is in column F. Enter the formula in the first data row, such as row 2, then fill it down the flag column.
Use a running SUMPRODUCT formula to flag the first qualifying ticket row
Use this method when repeated ticket IDs should receive a flag only on their first row that meets all required team conditions.
The formula counts qualifying rows for the current Ticket ID from the first data row through the current row. It returns 1 only when that running qualifying count is 1.
Click the flag cell beside the first ticket record, such as G2.
Type or paste this formula, then press Enter: =IF(AND(E2="L2 Support",OR(F2="Development Team",F2="Product Team"),SUMPRODUCT(--(A$2:A2=A2),--(E$2:E2="L2 Support"),--(((F$2:F2="Development Team")+(F$2:F2="Product Team"))>0))=1),1,"")
Select the formula cell and drag the fill handle down, or double-click the fill handle, to apply the formula to the remaining rows.

Use the accepted Ticket ID and escalation-team running check
Use this shorter variation when every L2 Support record for a ticket is already from Product Team or Development Team, or when you only need to deduplicate by Ticket ID and escalation team.
Flag First Matching Ticket Records with WPS Spreadsheets
WPS Spreadsheets lets you build a running conditional formula that identifies the first qualifying occurrence of each ticket ID. Enter the SUMPRODUCT formula in a helper column, fill it down, and filter the resulting 1 values to review the first matching tickets.
- 1. Open the ticket workbook: Open the worksheet containing the Ticket ID, escalation team, and assigning team columns in WPS Spreadsheets.
- 2. Add a flag column: Insert or select an empty column next to the ticket data and name it First Qualifying Occurrence.
- 3. Enter the conditional running formula: In the first data cell of the new column, enter the SUMPRODUCT formula using your Ticket ID and team columns.
- 4. Fill and filter results: Drag the fill handle down, then use Data > Filter to filter the flag column for 1.

Frequently Asked Questions
Why does COUNTIFS flag the same ticket more than once?
COUNTIFS can count all matching records without distinguishing whether the current row is the first qualifying record. Add a running range, such as A$2:A2, and test whether the qualifying count equals 1.
Can I use this formula if my ticket columns are in different locations?
Yes. Replace A with the Ticket ID column, E with the escalation-team column, and F with the assigning-team column. Keep the first row reference fixed with $ and let the ending row expand as the formula is filled down.
What does the formula return for a ticket that is not assigned to L2 Support?
It returns a blank because the AND condition requires the current row's escalation team to equal "L2 Support".
How can I show TRUE instead of 1 for the first matching ticket?
Replace the 1 after the final condition with TRUE, such as =IF(AND(...),TRUE,""). You can also replace it with a label such as "First".
Can I filter the list to show only the first qualifying tickets?
Yes. Select the header row, choose Data > Filter, then filter the flag column to display only cells containing 1.




