Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove duplicates within a row

How do I remove duplicates within a row for Excel without using VBA?

What i have:

Row 1: 1 | 1 | 2 | 2 | 3 | 3

What i want:

Row 1: 1 | 2 | 3

like image 474
Wen Jun Avatar asked Jan 25 '26 01:01

Wen Jun


1 Answers

If you don't care about spaces and you have the six numbers in cells A1:F1, you can do this in cells A2:F2:

=IF(COUNTIF($A$1:A1, A1) > 1, "", A1)

And just drag it across. For your example, that would result in 1, ,2, ,3, .

like image 175
jrad Avatar answered Jan 27 '26 17:01

jrad