Worksheet: Remove/Combine Duplicated Rows
Remove or combine worksheet rows based on duplicates in the selected reference column(s)
Minimum Origin Version Required: 2020b
wdeldup irng:=col(a) sensitive:=1;
wdeldup irng:=(1,2,3) keep1st:=removeAll tol:=1E-08 ow:=<new>;
Please refer to the page for additional option switches when accessing the x-function from script
| Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
|---|---|---|---|---|
| Reference Column | irng |
Input Range |
|
Specify the column(s) which need to be deleted duplicated rows.
Please note, if you select multiple reference columns, only the rows with duplicated values in all selected columns will be deleted. |
| Merge Duplications by | keep1st |
Input int |
|
Specify how to reduce worksheet with duplicated rows.
Option list:
|
| Case Sensitive | sensitive |
Input int |
|
Specify whether to be case sensitive in comparing two strings. |
| Duplication Tolerance | tol |
Input double |
|
Specify a tolerance value to treat close values as duplicates. |
| undo |
Input int |
|
Obsolete since Origin 2024b, use XF switch "-u" instead. | |
| Output Worksheet | ow |
Output Worksheet |
|
Specify the output worksheet.
See the syntax here. |
| Output Counts | counts |
Input int |
|
Specify whether to count and output the number of duplicate rows. |
This X-Function can remove/combine duplicated rows in a worksheet. It can be accessed from menu, command window.
Suppose a user has data as following and want to remove the duplicated strings in column A
| A | B |
|---|---|
| ABC | 1 |
| abc | 2 |
| ABC | 3 |
| def | 4 |
| ABC | 5 |
| abc | 6 |
| ABC | 7 |
| A | B | Count |
|---|---|---|
| ABC | 1 | 4 |
| abc | 2 | 2 |
| def | 4 | 1 |
Keywords:reduce, reduction