Dashboard Mode - SWITCH function
Goal
Find the category of a product based on its code using the SWITCH function.
Find the category of a product based on its code using the SWITCH function.
| Product Code | Product Name | Price |
|---|---|---|
| A1 | Apple | 1.20 |
| B2 | Banana | 0.80 |
| C3 | Carrot | 0.50 |
| D4 | Detergent | 3.00 |
| E5 | Eggs | 2.50 |
| F6 | Flour | 1.00 |
| X9 | Unknown Item | 0.00 |
=SWITCH(A2, "A1", "Fruit", "B2", "Fruit", "C3", "Vegetable", "D4", "Cleaning", "E5", "Dairy", "F6", "Baking", "Unknown")=COUNTIF(E2:E8, "Fruit") (and similar for other categories)+----------------------+---------------------+ | Product List | Category Summary | | (with SWITCH formula) | (counts per category) | +----------------------+---------------------+
Filtering the product list by category updates the summary counts automatically. Selecting a category highlights matching products.
If you add a filter to show only products in the "Fruit" category, which products remain visible and what is the count in the summary?