> ## Documentation Index
> Fetch the complete documentation index at: https://help.dingtalk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Mark duplicate values in a table

> Highlight every row with a duplicate product name in red so they stand out at a glance.

## What it looks like

Rows where the product name is duplicated get filled in red.

![](https://img.alicdn.com/imgextra/i3/O1CN01Zea5051aPzGrIEtQj_!!6000000003323-2-tps-1381-752.png)

## How to set it up

**Step 1.** Add an **Auto Number** field to give each row a sequence number.

![](https://img.alicdn.com/imgextra/i2/O1CN0150hE5D1JMSks7vcgq_!!6000000001014-2-tps-1378-708.png)

**Step 2.** Add a helper field of type **Lookup**. Look up the **Sequence** field, match where product name equals product name, and set the aggregation to **Min**.

![](https://img.alicdn.com/imgextra/i4/O1CN01jqm5sp1dUW2BCQe1G_!!6000000003739-2-tps-805-805.png)

**Step 3.** Add a Formula field. When the helper number is smaller than the sequence number, display the word **Duplicate**.

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
IF(value([Helper])<value([Sequence]),"Duplicate","")
```

![](https://img.alicdn.com/imgextra/i4/O1CN01ZK5BJF1gnF4kGBOlr_!!6000000004186-2-tps-1377-702.png)

**Step 4.** Set **Row color** to fill the **entire row** — duplicate rows now turn red.

![](https://img.alicdn.com/imgextra/i1/O1CN01LKuUVo1CdgKq0CMzK_!!6000000000104-2-tps-988-386.png)

> 💡 Tip: hide the Sequence, Helper, and Formula fields to keep the grid view clean.
