Dashboard Mode - REGEXMATCH and REGEXEXTRACT
Dashboard Goal
Find and extract specific patterns from a list of product codes to quickly identify valid codes and pull out key parts like region and product type.
Find and extract specific patterns from a list of product codes to quickly identify valid codes and pull out key parts like region and product type.
| Row | Product Code |
|---|---|
| 2 | US-1234-XL |
| 3 | EU-5678-M |
| 4 | AS-ABCD-L |
| 5 | US-9999-S |
| 6 | XX-0000-XX |
| 7 | EU-4321-XL |
| 8 | InvalidCode |
=SUMPRODUCT(--REGEXMATCH(B2:B8, "^[A-Z]{2}-\d{4}-[SML]{1,2}|XL$"))=REGEXMATCH(B2, "^[A-Z]{2}-\d{4}-(S|M|L|XL)$")=REGEXEXTRACT(B2, "^[A-Z]{2}")=REGEXEXTRACT(B2, "(S|M|L|XL)$")+-------------------------+------------------------------+ | Valid Codes Count (KPI) | Product Codes Table | | | +------------+---------+--------+---------+| | | | Code | Valid? | Region | Product | | | | | | | Type | | | +------------+---------+--------+---------+| | | | US-1234-XL | TRUE | US | XL | | | | EU-5678-M | TRUE | EU | M | | | | AS-ABCD-L | FALSE | AS | L | | | | US-9999-S | TRUE | US | S | | | | XX-0000-XX | FALSE | XX | | | | | EU-4321-XL | TRUE | EU | XL | | | | InvalidCode| FALSE | | | +-------------------------+------------------------------+
Add a filter dropdown to select Region codes (e.g., US, EU, AS, XX). When a region is selected, the table updates to show only product codes from that region. The Valid Codes Count KPI updates to count only valid codes in the selected region.
If you add a filter for Region = "EU", which rows remain visible in the table and what is the updated Valid Codes Count?
Answer: Rows with product codes "EU-5678-M" and "EU-4321-XL" remain. Valid Codes Count updates to 2.